added a special thread for making thumbnails (thumb.h thumb.cpp)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@700 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
13
core/app.cpp
13
core/app.cpp
@@ -7,7 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "wand/MagickWand.h"
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
@@ -147,7 +146,6 @@ bool App::Init()
|
||||
session_manager.LoadSessions();
|
||||
|
||||
CreateStaticTree();
|
||||
MagickWandGenesis();
|
||||
|
||||
plugin.Call(WINIX_PLUGIN_INIT);
|
||||
|
||||
@@ -155,12 +153,6 @@ return true;
|
||||
}
|
||||
|
||||
|
||||
void App::Uninit()
|
||||
{
|
||||
MagickWandTerminus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::Close()
|
||||
{
|
||||
@@ -984,6 +976,7 @@ void App::WaitForThreads()
|
||||
|
||||
system.notify.WaitForThread();
|
||||
session_manager.WaitForGC();
|
||||
system.thumb.WaitForThread();
|
||||
}
|
||||
|
||||
|
||||
@@ -1019,6 +1012,7 @@ sigset_t set;
|
||||
Ezc::WideToUTF8(app->config.base_url, app->url_to_fetch_on_exit);
|
||||
app->system.notify.PrepareToStopThread();
|
||||
app->session_manager.PrepareToStopGC();
|
||||
app->system.thumb.WakeUpThread();
|
||||
app->Unlock();
|
||||
|
||||
// this thread will hang on this method
|
||||
@@ -1051,6 +1045,9 @@ sigset_t set;
|
||||
|
||||
// gc for sessions
|
||||
session_manager.StartGC();
|
||||
|
||||
// thumbnails
|
||||
system.thumb.StartThread();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user