[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [ID 19991229.003] perl 5.005_03 core dumps -- singal
On Wed, Jan 12, 2000 at 10:28:40AM -0500, Dan Sugalski wrote:
> >You still think that you can wake something which cond_wait()s from
> >another thread. And you make things extremely complicated and
> >extremely unefficient.
>
> Yes I do, and no it isn't. Perl code does a cond_wait. The cond_wait code
> stores the condition in the thread structure and waits. Something needs to
> wake the thread, so it sets the condition and wakes it. No Big Deal.
If it were correct, sure. But it is not. This will not "wake it", it
will wake all the threads which wait on this condition. So some more
work is needed.
> And yes, a new thread for long syscalls is inefficient. (And a completely
> different topic than cond_waits)
Then why did you mention cond_waits?
> Thread pools make it cheaper (or at least
> amortize the costs) and if the call is likely to block for a while anyway
> the real expense is essentially non-existant.
How would you know whether it is likely to do it or not? This is the
whole point of threads that you do not need to know this, and still
can write effecient programs.
Ilya
- References to:
-
Dan Sugalski <dan@sidhe.org>
Larry Wall <larry@wall.org>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Dan Sugalski <dan@sidhe.org>
Ilya Zakharevich <ilya@math.ohio-state.edu>
Dan Sugalski <dan@sidhe.org>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]