class DelayedReturn

The "DelayedReturn" class implements delayed returning from functions. More...

Full nameArts::DelayedReturn
Definition#include <arts/delayedreturn.h>
List of all Methods
Annotated List

Public Methods

Protected Methods

Protected Members

Detailed Description

The "DelayedReturn" class implements delayed returning from functions.

For instance, suppose you would like to return from a wait() operation only after a certain time has passed, without blocking other clients from using your interface during this time.

Your implementation (in the skel file) of wait should look like this

 static DelayedReturn *delayedReturn = 0;

 bool TimeServer::waitUntil(long time)
     if(time(0) < time)
     	   // ... initialize timer here ...
         delayedReturn = Dispatcher::the()->delayReturn();
     return false; 

 void timerEvent()

NOTE: this class breaks for local use (i.e. you can only use it if the call was a remote call), so it is strongly recommended not to use it unless there is no alternative (and you should really know what you are doing, too).

Buffer * buffer

[protected: ]

Connection * connection

[protected: ]

 DelayedReturn ()

[protected: ]

void  initialize (Connection *connection, Buffer *buffer)

[protected: ]

 ~DelayedReturn ()

[protected: ]

void  doReturn (const AnyConstRef& value)

call this only once to make the request really return

Generated by: stefan@stefan on Sat Feb 24 19:11:23 2001, using kdoc 2.0a47.