From: Vladimir Frolov (voidbent_at_[hidden])
Date: 2006-06-02 07:34:47
I have finished implementation of Lwsync library, which contains two
patterns to organize synchronization on concurrent environment. I
would like to propose to include this library into Boost.
Lwsync provides critical resource and monitor patterns. Critical
resource synchronizes all accesses to specific resource and
automatically invokes locking and unlocking methods before and after
each access. Monitor pattern is a kind of critical resource which not
only synchronizes all accesses but also allows one to wait until
resource becomes in defined state.
One can use Lwsync patterns like this:
typedef critical_resource<std::vector<int> > critical_vector_t;
critical_vector_t::const_accessor vector_access = critical_vector;
for(size_t i = 0; i < vector_access->size(); ++i)
*sync_cout.access() << "Index : " << i
<< ", Data : " << (*vector_access)[i] << std::endl;
typedef monitor<std::vector<int> > monitor_vector_t;
bool is_not_empty(const std::vector<int>& test_vector)
monitor_vector_t::accessor vector_access =
// Do something with non-empty vector here.
Lwsync library can be mapped on any threading facilities and by
default it is mapped on Boost.Thread ones.
Is there any interest in this library?
--- With respect, Vladimir Frolov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk