Boost logo

Boost :

From: Michael Glassford (glassfordm_at_[hidden])
Date: 2004-06-25 15:04:13


No comments? Perhaps my original message is too long or too abstract.
Let me summarize.

For the reasons mentioned in my original post (primarily fixing
inconsistencies and unintuitive behavior), I propose changing:

1: explicit scoped_lock(Mutex& mx, bool initially_locked=true)
2: explicit scoped_try_lock(TryMutex& mx)
3: scoped_try_lock(TryMutex& mx, bool initially_locked)
4: scoped_timed_lock(TimedMutex& mx, bool initially_locked)

to:

1: explicit scoped_lock(Mutex& mx, lock_state initial_state=LOCK)
2: scoped_try_lock(TryMutex& mx, blocking_mode blocking)
3: scoped_try_lock(TryMutex& mx, lock_state initial_state, blocking_mode
blocking)
4: scoped_timed_lock(TimedMutex& mx, lock_state initial_state)

where lock_state is defined something like this:

     namespace lock_state {
         typedef enum
         {
             unlocked=0,
             locked=1
         } lock_state;
     }

and blocking_mode is defined something like this:

     namespace blocking_mode {
         typedef enum
         {
             non_blocking=0,
             blocking=1
         } blocking_mode;
     }

Mike


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