aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-09-21 05:01:53 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-09-21 05:01:53 +0800
commit412c2967bb93845e152022aefac70ad93571a288 (patch)
tree55d48f12679eb94191862e454eb87f9faa725796 /mail/mail-mt.c
parentb5bf3f9615b040be5f9d7402a861b1c44dfd18c4 (diff)
downloadgsoc2013-evolution-412c2967bb93845e152022aefac70ad93571a288.tar.gz
gsoc2013-evolution-412c2967bb93845e152022aefac70ad93571a288.tar.zst
gsoc2013-evolution-412c2967bb93845e152022aefac70ad93571a288.zip
Register vfolder sources here.
2001-09-20 <NotZed@Ximian.com> * mail-tools.c(mail_tool_uri_to_folder): Register vfolder sources here. * folder-browser.c (got_folder): Dont register vfolder sources here. * mail-ops.c (mail_get_folder): Add thread parameter. Fix callers. * mail-vfolder.c (vfolder_setup): Use the 'slow' queue for setting up vfolders. * mail-mt.c (mail_msg_init): Limit the maximum number of threads on the 'new' thread to 10. (mail_msg_init): Create a new queue 'slow' for doing slow operations. svn path=/trunk/; revision=13017
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 634dd91eae..9a2033c2e9 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -244,6 +244,7 @@ static GIOChannel *mail_gui_reply_channel;
/* a couple of global threads available */
EThread *mail_thread_queued; /* for operations that can (or should) be queued */
+EThread *mail_thread_queued_slow; /* for operations that can (or should) be queued, but take a long time */
EThread *mail_thread_new; /* for operations that should run in a new thread each time */
static gboolean
@@ -344,6 +345,7 @@ mail_msg_received(EThread *e, EMsg *msg, void *data)
static void mail_msg_cleanup(void)
{
+ e_thread_destroy(mail_thread_queued_slow);
e_thread_destroy(mail_thread_queued);
e_thread_destroy(mail_thread_new);
@@ -368,10 +370,16 @@ void mail_msg_init(void)
e_thread_set_msg_received(mail_thread_queued, mail_msg_received, 0);
e_thread_set_reply_port(mail_thread_queued, mail_gui_reply_port);
+ mail_thread_queued_slow = e_thread_new(E_THREAD_QUEUE);
+ e_thread_set_msg_destroy(mail_thread_queued_slow, mail_msg_destroy, 0);
+ e_thread_set_msg_received(mail_thread_queued_slow, mail_msg_received, 0);
+ e_thread_set_reply_port(mail_thread_queued_slow, mail_gui_reply_port);
+
mail_thread_new = e_thread_new(E_THREAD_NEW);
e_thread_set_msg_destroy(mail_thread_new, mail_msg_destroy, 0);
e_thread_set_msg_received(mail_thread_new, mail_msg_received, 0);
e_thread_set_reply_port(mail_thread_new, mail_gui_reply_port);
+ e_thread_set_queue_limit(mail_thread_new, 10);
mail_msg_active = g_hash_table_new(NULL, NULL);
mail_gui_thread = pthread_self();