[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble joining with threads from C

From: Andy Wingo
Subject: Re: Trouble joining with threads from C
Date: Sat, 16 Apr 2011 17:55:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Heya Ludo,

On Fri 15 Apr 2011 23:44, address@hidden (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]