diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2007-04-14 22:20:10 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2007-04-14 22:20:10 +0000 |
commit | 8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e (patch) | |
tree | 724ddc9ab6cb3a362051fe1e081b3ccdcd7c0d5c /external/rcclibtranslate.c | |
parent | b91203daf1a2b5865bfd284821c0c0b103f5b8e7 (diff) | |
download | librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.tar.gz librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.tar.bz2 librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.tar.xz librcc-8ca43646a6c87d00d5b2cb74cebf65a8d0ea5e8e.zip |
DB4 & Postponed processing
- New DB4 database type
- Postponed processing in external module
+ User may allow external module to finish required processing before
termination. This could be useful for translation services while using
console applications (if network connection is slow, the external will
never finish translation before program termination)
- SKIP_PARRENT options are renamed to SKIP_PARENT
Diffstat (limited to 'external/rcclibtranslate.c')
-rw-r--r-- | external/rcclibtranslate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/external/rcclibtranslate.c b/external/rcclibtranslate.c index 24f44a2..c64020c 100644 --- a/external/rcclibtranslate.c +++ b/external/rcclibtranslate.c @@ -35,6 +35,7 @@ static GCond *cond = NULL; static GQueue *queue = NULL; static GThread *thread = NULL; +extern char rcc_external_offline; static char *rccCreateKey(const char *from, const char *to, const char *data, size_t *keysize) { char *res; @@ -78,7 +79,7 @@ static void *rccLibPostponed(void *info) { to[2] = 0; g_mutex_lock(mutex); - while (!exitflag) { + while ((!exitflag)||(rcc_external_offline)) { data = (char*)g_queue_pop_head(queue); if (data) { g_mutex_unlock(mutex); @@ -103,6 +104,7 @@ static void *rccLibPostponed(void *info) { free(data); g_mutex_lock(mutex); } else { + if (exitflag) break; g_cond_wait(cond, mutex); } } |