Library: Foundation
Package: Threading
Header: Poco/RunnableAdapter.h
This adapter simplifies using ordinary methods as targets for threads. Usage:
RunnableAdapter<MyClass> ra(myObject, &MyObject::doSomething)); Thread thr; thr.Start(ra);
For using a freestanding or static member function as a thread target, please see the ThreadTarget class.
Direct Base Classes: Runnable
All Base Classes: Runnable
Member Functions: operator =, run
Inherited Functions: run
typedef void (C::* Callback)();
RunnableAdapter(
const RunnableAdapter & ra
);
RunnableAdapter(
C & object,
Callback method
);
~RunnableAdapter();
RunnableAdapter & operator = (
const RunnableAdapter & ra
);
void run();
See also: Poco::Runnable::run()