Home » Developing U++ » U++ Developers corner » Unified locking?
Unified locking? [message #17780] |
Thu, 28 August 2008 15:41 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
Just a small idea, maybe we can officially name two methods:
EnterMutex
LeaveMutex
and use them for "unified locking". I mean, if you e.g. have any type wich instances are to be locked, it should have these two methods.
We could then apply commong constructs to such objects, e.g. templated Mutex::Lock or INTERLOCKED.
For example, if CtrlCore gets traditionally MT safe, we could do
ArrayCtrl a;
INTERLOCKED_(a) {
....
}
of course, obvious utility is
template <class T> class WithMutex : T, Mutex {}
Mirek
|
|
|
Goto Forum:
Current Time: Thu May 16 18:50:07 CEST 2024
Total time taken to generate the page: 0.01613 seconds
|