Poco

template < class C >

class RunnableAdapter

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 inline

RunnableAdapter(
    const RunnableAdapter & ra
);

RunnableAdapter inline

RunnableAdapter(
    C & object,
    Callback method
);

Destructor

~RunnableAdapter virtual inline

~RunnableAdapter();

Member Functions

operator = inline

RunnableAdapter & operator = (
    const RunnableAdapter & ra
);

run virtual inline

void run();

Securely control IoT edge devices from anywhere   Connect a Device