The Vish Visualization Shell 0.3
Vish
Wizt::VThreadManager Class Reference

Managing Threads - the code to be executed in another thread is provided in functor objects derived from VTask. More...

#include <ocean/plankton/VThreadManager.hpp>

Public Member Functions

virtual RefPtr< VTaskCurrentThread ()
 Get a reference to the currently running thread that calls this function.
virtual bool isrunning (const RefPtr< VTask > &what) const
 Check whether a specific thread is still running.
virtual bool sendMessage (const RefPtr< VTask > &what, const RefPtr< VTaskMessage > &)
 Send a message to a thread - it will receive a valueChanged() call, like any other VInput object.
virtual bool start (const RefPtr< VTask > &what)
 Fire a thread.
virtual bool wait (const RefPtr< VTask > &what)
 Wait for a thread to finish.
virtual void waitForAll (unsigned long MaxTimeoutMilliseconds=~0)
 Wait for all pending thread to finish.

Detailed Description

Managing Threads - the code to be executed in another thread is provided in functor objects derived from VTask.

VThreadManager objects are not supposed to be created in application code. To get a VThreadManager, call

static VThreadManager * getThreadManager()
Get the current thread manager, eventually creating one if not yet existent.
Definition VThreadManager.cpp:17
Todo
Add cache-like management, probably using the MemCore::Cache class