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

Re: [PATCH] Adding callbacks to the core

Thread Previous | Thread Next
Arthur Bergman
August 22, 2001 06:16
Re: [PATCH] Adding callbacks to the core
Message ID:
01-08-22 14.56, skrev David M. Lloyd på följande:
>I changed the code to share the async check with signals; therefore there
>will be no speed difference in the default case.  However, I will do some
>benchmarking anyways just to satify the crowd.

How does it affect performance one signals occur. This is in the hottest
part of the hot path of perl.

>> Under ithreads, the callbacks are by interpreter, hence there is no
>> need to lock the list of callbacks.
> The mutex is not for the sake of ithreads OR 5005threads.  The mutex is
> there so an XS module can launch a thread and have a clean way to
> resynchronize.  If it were possible, I'd use the mutex even if Perl wasn't
> compiled to use threads.

I would stronly recomend against using perl with a threaded program without
compiling with threads or ithreads. You will be probably link against the
wrong c library.

You are not mutexing in the dispatch loop, which means that if the next is
disabled during the exeuction of the current dispatching callback, all the
following ones are not called.

Since mutexing in the dispatch loop is not realy an option, it would be nice
to have a data structure that mutexes on free/create and not disable enable.
And make it safe to remove a freed one.

However I do like this idea. I think I will make POSIX aio available to perl
after ithreads start working :)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About