develooper Front page | perl.perl5.porters | Postings from August 2001

Re: SV: SV: Implementing Callbacks (Was: RE: [PATCH] Addingcallbacks to thecore)

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
August 22, 2001 13:29
Subject:
Re: SV: SV: Implementing Callbacks (Was: RE: [PATCH] Addingcallbacks to thecore)
Message ID:
5.1.0.14.0.20010822161928.08c38180@tuatha.sidhe.org
At 10:25 PM 8/22/2001 +0200, Arthur Bergman wrote:
>If it is signal async function run in the same executing thread then we 
>don't need to lock the mutex anyway and I assume that we don't need to 
>bother with the thread memory rules either. A real async C function 
>shouldn't mess with many things :)

Alas, memory rules and synchronization are still an issue. You can't 
guarantee which thread is handling the signal at the C level--it might be 
executing on a different CPU at the same time your interpreter thread's 
executing. (Likely, in fact, on an SMP machine under most OSes)

Mixing async code with threads is generally a tricky thing. But, then, 
mixing async code with anything makes life tricky.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About