ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
Re: Async::Callback (was: Re: Asynchronous callbacks from C)
by David M. Lloyd other posts by this author
Aug 1 2001 6:45PM messages near this date
Re: Async::Callback (was: Re: Asynchronous callbacks from C) | [PATCH perlfaq9.pod typo]
On Tue, 31 Jul 2001, Richard Soderberg wrote:

>  Could you provide a variant that is reentrant?  That would be quite
>  useful :)

Technically it's still possible to use the module in a reentrant fashion
(at the cost of speed).  What you do is register your callback and enable
it right away in a non-critical section, then have your callback check a
flag.  If the flag is false, just return.  Then all your asychronous code
has to do is set the flag when you want the callback to do its stuff.

Granted there's a slight performance hit involved, but I can't think of a
faster way to do this.

- D

<dmlloyd@[...].net> 
Thread:
David M. Lloyd
Richard Soderberg
David M. Lloyd

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved