Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-08-20 19:14:47

williamkempf_at_[hidden] wrote:

> How? Pass "f"
> a parameter that includes a monitor construction which the thread
> waits for.

        Urgle. Isn't that a bit complex a technique for a simple
exchange of identities?

> While I'm thinking about it, there's an even easier method for doing
> this. It creates a minor race condition,

        What is a "minor race condition"?
Do you mean (in the example) that a get() by the child thread may
return the initial 0 value, before the smart pointer actually
receives the thread object pointer? That may not be a minor problem,
such an error may result in caching the value on a multi-processor
system, so that all subsequent reads up to a synchronisation point
are wrong. Worse, the user may cache the value, which means
its permanently wrong. There's no such thing as a minor fault
in software. Its either correct, or its not. Would you allow
a 'minor race condition' in your heart pacemaker? :-)

John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix
Literate Programming tool Interscript

Boost list run by bdawes at, gregod at, cpdaniel at, john at