table of contents
shevek::closure(3) | Library Functions Manual | shevek::closure(3) |
NAME¶
shevek::closure - Block and resume without blocking the main loop.SYNOPSIS¶
#include <closure.hh> Inherits shevek::refbase.Public Member Functions¶
bool empty () const
Static Public Member Functions¶
static Glib::RefPtr< closure > create ()
Detailed Description¶
Block and resume without blocking the main loop.Member Function Documentation¶
static void shevek::closure::block () [static]¶
Sleep, returning control to the caller until awoken. This function puts the current closure to sleep. It will continue to run when awoken with wake(). It can also be destroyed. This function uses a global variable to know which is the current closure, so it can be called without an object, as closure::block (); .static Glib::RefPtr<closure> shevek::closure::create () [inline, static]¶
Create a new closure. Create a new closure. It will be empty initially.bool shevek::closure::empty () const [inline]¶
Check if the closure is empty. Check if the closure is empty. If it is, set_function() can be called.void shevek::closure::set_function (sigc::slot0< void >func, boolrun = true, sigc::slot0< void >cb = sigc::slot0< void >())¶
Set running function on an empty closure. Set running function. The closure must be empty when this is called. When the function exits, the closure returns to the empty state, and the callback is called, if given.void shevek::closure::wake ()¶
Continue running the closure. Wake a closure. It is an error to wake a closure which isn't blocking (in particular also the currently running closure).Author¶
Generated automatically by Doxygen for libshevek from the source code.Fri May 11 2012 | libshevek |