File Information
Library: Foundation
Package: Threading
Header: Poco/RunnableAdapter.h
Description
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.
Inheritance
Direct Base Classes: Runnable
All Base Classes: Runnable
Member Summary
Member Functions: operator =, run
Inherited Functions: run
Types
void
typedef void (C::* Callback)();
Constructors
RunnableAdapter
RunnableAdapter(
const RunnableAdapter & ra
);
RunnableAdapter
RunnableAdapter(
C & object,
Callback method
);
Destructor
~RunnableAdapter
~RunnableAdapter();
Member Functions
operator =
RunnableAdapter & operator = (
const RunnableAdapter & ra
);
run
void run();
See also: Poco::Runnable::run()