From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: Trouble joining with threads from C
Date: Sat, 16 Apr 2011 17:55:50 +0200 [thread overview]
Message-ID: <m3r592i41l.fsf@unquote.localdomain> (raw)
In-Reply-To: <87ipufdwa3.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 15 Apr 2011 23:44:52 +0200")
Heya Ludo,
On Fri 15 Apr 2011 23:44, ludo@gnu.org (Ludovic Courtès) writes:
>> For example in the following program:
>>
>> void* thread (void*)
>> {
>> scm_with_guile (do_something, NULL);
>> scm_with_guile (do_something_else, NULL);
>> return NULL;
>> }
>>
>> int main ()
>> {
>> pthread_t thr;
>> pthread_create (&thr, NULL, thread, NULL);
>> pthread_join (thr, NULL);
>> return 0;
>> }
>>
>> When do you propose that the cleanup handlers for the thread be called?
>
> I’ll followup on this later, but currently it seems impossible to call
> GC_INIT from a thread other than the initial thread [0].
Interesting; I had it working at some point, in the context of that
other bug; anyway, the same considerations hold if you scm_init_guile
in the main thread first.
Cheers,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2011-04-16 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 5:56 Trouble joining with threads from C Mark H Weaver
2011-03-09 6:48 ` Mark H Weaver
2011-03-18 12:23 ` Andy Wingo
2011-03-20 23:11 ` Ludovic Courtès
2011-04-13 21:25 ` Ludovic Courtès
2011-04-13 21:34 ` Ludovic Courtès
2011-04-15 8:41 ` Andy Wingo
2011-04-15 21:44 ` Ludovic Courtès
2011-04-16 15:55 ` Andy Wingo [this message]
2011-04-25 13:53 ` Ludovic Courtès
2011-04-25 14:19 ` Andy Wingo
2011-04-25 14:49 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3r592i41l.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).