Another question. Mutex supposed to be noncopyble. How are going to create vector<mutex> and fill it with mutex instances?
this example:
vector<mutex> vec;
lock(vec.begin(),vec.end());
fails on gcc 4.3.2, complaining that the vector iterator doesn`t have members named, lock(), unlock(), ...