Boost logo

Boost :

From: Mark Rodgers (mark.rodgers_at_[hidden])
Date: 2001-03-22 14:36:35


> One thing to keep in mind... the typical purpose of such categories is
for
> dispatching to different algorithms. However, off the top of my head I
> can't imagine why someone would want to do this... isn't it the case that
> if you need a trylock or timedlock, just a normal lock won't do?

This is exactly the reason. You might sometimes need a trylock or a
timedlock, and so you might have a static assertion that that is what
you have been given. You might also prefer a trylock but if given a
timedlock will accept it, and dispatch to an algorithm that uses
a small timeout value. Likewise, you might prefer a timedlock, but
if given a trylock you could dispatch to an algorithm that contains
its own loop.

Mark


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