|
Boost : |
From: Jesse Jones (jesjones_at_[hidden])
Date: 2001-04-20 18:09:19
I recently switched to emailer and for some reason its not sending
mail composed offline. Here's an old message:
1) A consensus seems to be building that basic_lock::operator bool()
isn't a Good Thing. I suggested a const void* conversion operator
would be better, but as was mentioned that would allow comparisons
which seems silly. I also don't think code like:
lock_type lock(mutex);
if (lock)
...;
is as readable as it could be. I'd vote for an explicit is_locked() method.
2) I don't think the error handling in, eg the Windows semaphore.cpp
is quite right. CreateSemaphore is now asserting instead of throwing
which seems wrong. CloseHandle OTOH doesn't check for errors. This is
in a dtor and CloseHandle probably doesn't do any useful work from
the clients POV so an assert seems warranted here.
3) Has there been any consideration to cooperative threading? I'm
mostly a Mac guy and while preemptive threads are available they come
with too many restrictions to be broadly useful.
-- Jesse
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk