#include <thread.h>
Protected Member Functions | |
LockedPointer () | |
Create an instance of a locked pointer. | |
void | replace (Object *object) |
Replace existing object with a new one for next request. | |
Object * | dup (void) |
Create a duplicate reference counted instance of the current object. | |
void | operator= (Object *object) |
Replace existing object through assignment. | |
Friends | |
class | locked_release |
This class is used to support a threadsafe replacable pointer to a object. This class is used to form and support the templated locked_pointer class and used with the locked_release class. An example of where this might be used is in config file parsers, where a seperate thread may process and generate a new config object for new threads to refernce, while the old configuration continues to be used by a reference counted instance that goes away when it falls out of scope.
Definition at line 1320 of file thread.h.
Object* ucc::LockedPointer::dup | ( | void | ) | [protected] |
Create a duplicate reference counted instance of the current object.
Reimplemented in ucc::locked_pointer< T >.
void ucc::LockedPointer::operator= | ( | Object * | object | ) | [inline, protected] |
void ucc::LockedPointer::replace | ( | Object * | object | ) | [protected] |
Replace existing object with a new one for next request.
object | to register with pointer. |