From 412c2967bb93845e152022aefac70ad93571a288 Mon Sep 17 00:00:00 2001 From: 0 Date: Thu, 20 Sep 2001 21:01:53 +0000 Subject: Register vfolder sources here. 2001-09-20 * 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 --- mail/mail-mt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mail/mail-mt.c') 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(); -- cgit