OFiberingServer Depends on cooperative executing IExecutable-Objects
![]() | add (const ORef<IExecutable>& ref) Adds an IExecutable to the server and starts calling its execute() method |
![]() | complete () Wait till all excutables are finished |
![]() | getNextCompleted () Block until the next executable has finished and return a reference to it |
![]() | OFiberingServer () Creates an empty fiberserver |
![]() | remove (const ORef<IExecutable>& ref) Stops calling the the IExecutable and removes it from the server |
![]() | ~OFiberingServer () By destroying the OFiberServer, you also delete all its IExecutable-Objects |
OFiberingServer Depends on cooperative executing IExecutable-Objects. The OFiberingServer creates one thread where each IExecutables execute() method is called in turn. When an execute() returns False, the FiberServer assumes it is finished and stops calling it. As the FiberServer depends on the cooperative nature of the IExecutables, their execute()-methods should neither contain blocking functions nor should they be used to do very time-consuming task. If you need preemtive multitasking or want to use blocking calls, use a OThreadServer instead.Further ideas: - Include a sleep() operation (in IExecutable?) to tell the OFiberingServer not to call the IExecutable for some time. - Assign an delay/call-intervall attribute to the IExecutable, which tells the OFiberingServer/OThreadingServer to let the specified time pass doing something else before calling the executable again.
~OFiberingServer()
void add(const ORef<IExecutable>& ref)
void remove(const ORef<IExecutable>& ref)
void complete()
ORef <IExecutable> getNextCompleted()
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de