Public Methods | |
| synchronized (const synchronized &s) | |
| This copy constructor allows a developer to obtain a synchronized instance and keep it for the life of the current scope. More... | |
| ~synchronized () | |
| Called when local copy of a synchronized instance goes out of scope. | |
Friends | |
| class | Object |
Instances are created using the Object's synchronize() method.
Definition at line 100 of file Object.
|
|
This copy constructor allows a developer to obtain a synchronized instance and keep it for the life of the current scope. So, for some class derived from Object, a method could do the following to ensure mutual exclusion.
void foo_method()
{
Object::sychronized s = synchronize();
// -- do whatever necessary...
}
|
1.2.9.1 written by Dimitri van Heesch,
© 1997-2001