Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2007-03-25 17:53:07


> Peter Dimov wrote:> > Howard Hinnant wrote:> > > >> N2184 takes the minimalist approach. It is easier to add> >> functionality (and the associated expense) than to subtract it. There> >> are many things the N2184::thread does not directly support. I> >> believe this is a feature, not a bug.> > > > This is true under the assumption that we need to target the least common > > denominator. Try/timed joins for example come for free on Windows. So you > > are imposing an unnecessary mutex+cv overhead for everyone wanting to use > > try/timed joins there.> > > > I've decided to adopt a different approach and suggest a way to equalize > > ('harmonise' in EU terms :-) ) the platforms via the join2 extensions. In a > > perfect world, this would lead to everyone enjoying _zero overhead_ > > try/timed joins in a few years once pthread implementors adopt the > > extensions.> > > > Yes, I agree that this can be considered idealistic; but the other option is > > to not even give them a chance to offer the functionality as there would be > > no portable C++ way to take advantage of it. > > I'm far from being an expert on the Windows internals, but maybe what > seems to "zero overhead" try/timed join is not really zero overhead, and > the overhead is there, just hidden somewhere inside. If that's the case, > then the "idealistic" way to go is to get Windows to supply a true zero > overhead join.
I am also not an expert, but my understanding is that there are no technical problems to extend the pthread interface to support try/timed joins, and that this does not introduce overhead.
 
If this is correct, and if N2178 is accepted, then zero-overhead try/timed join becomes available across the the board. If N2184 is accepted, then zero-overhead try/timed join becomes unavailable across the board, regardless of whether it is possible from a technical point of view.
 
Emil Dotchevski
_________________________________________________________________
Take a break and play crossword puzzles - FREE!
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_ wlmemailtaglinemarch07


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk