diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-01-31 21:24:32 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-01-31 21:24:32 +0400 |
commit | 2d708971163dc99f9c29cc47e7d4f56a3af882c5 (patch) | |
tree | 91d29c6ac7727405e01f065eabe062431302483c /src/plugins | |
parent | 3958296431df16a30550047103008c1324fa331a (diff) | |
download | rspamd-2d708971163dc99f9c29cc47e7d4f56a3af882c5.tar.gz rspamd-2d708971163dc99f9c29cc47e7d4f56a3af882c5.zip |
Rework events library slightly:
- forced events are no longer checked or created
- add async threads to prevent session to be destroyed till all threads are finished
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/regexp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 902078d29..9d2210c56 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -1227,6 +1227,7 @@ process_regexp_item_threaded (gpointer data, gpointer user_data) g_mutex_unlock (workers_mtx); } } + remove_async_thread (ud->task->s); } static void @@ -1240,6 +1241,7 @@ process_regexp_item (struct worker_task *task, void *user_data) thr_ud = memory_pool_alloc (task->task_pool, sizeof (struct regexp_threaded_ud)); thr_ud->item = item; thr_ud->task = task; + register_async_thread (task->s); g_thread_pool_push (regexp_module_ctx->workers, thr_ud, NULL); } else { |