RE: Re: [Prothon-commits] rev 149 - in trunk:include/prothon src
"Mark Hahn" <[email protected]> Sat, 27 Mar 2004 15:20:35 -0800
| Newsgroups | gmane.comp.lang.prothon.devel |
|---|---|
| Message-ID | <[email protected]> |
Don't understand. Point me to a line. -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Ben Collins Sent: Saturday, March 27, 2004 6:11 AM To: [email protected] Subject: [Prothon-dev] Re: [Prothon-commits] rev 149 - in trunk:include/prothon src > + if (main_argv_obj && list_len(ist, main_argv_obj)) { > + new_thread_obj((apr_thread_start_t)main_thread, main_argv_obj); > + /* Grab this lock, so we know main1 thread has started */ > + pr_lock(&thread_registry_lock); pr_unlock(&thread_registry_lock); > > + } > + > threads = get_attr(ist, sys_argv_obj, sym(ist, "threads")); > if (threads) { > int i; > for (i = 0; i < list_len(ist, threads); i++) > - start_new_thread((apr_thread_start_t)main_thread, list_item(ist, threads, i)); > + new_thread_obj((apr_thread_start_t)main_thread, list_item(ist, threads, i)); > } Mark, I think you need to release that pr_lock() before starting new threads, else you'll get a deadlock when new_thread_obj() tries to lock it again. If you aren't, then something is wrong with locking :) -- Debian - http://www.debian.org/ Linux 1394 - http://www.linux1394.org/ Subversion - http://subversion.tigris.org/ WatchGuard - http://www.watchguard.com/ _______________________________________________ Prothon-dev mailing list [email protected] http://lists.prothon.org/mailman/listinfo/prothon-dev