Boost logo

Boost Users :

Subject: Re: [Boost-users] Thread question.... detecting deadlocks?
From: Eric J. Holtman (eric_at_[hidden])
Date: 2011-03-08 14:44:16


On 3/8/2011 1:00 PM, Ted Byers wrote:

>
> So, if I can answer a question with a question, is it not possible to always
> prevent deadlocks and race conditions by careeful analysis and use of the
> right suite of semaphores, or it is just that my experience with
> multithreading is too limited to have seen those cases where my approach is
> insufficient?
>

Oh, I completely agree with you. But sometimes, you just
forget where the boundaries are in your application code,
and well, then . . . . .

My error that caused the deadlock was certainly something
I never should have done, but it (as always) happened so
rarely that it was hard to replicate (and in some cases,
hard to notice, as it only locked two threads out of many).

Likewise: I wouldn't run my application with STL iterator
debugging enabled, but it's great during development for
those occasional brain farts.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net