ifw-slm 0.1.2
 
Loading...
Searching...
No Matches
killableActivity.hpp File Reference

KillableThreadActivity - a thread-based activity with timed join. More...

#include <rad/activity.hpp>
#include <atomic>
#include <string>
#include <thread>

Go to the source code of this file.

Classes

class  ifw::slm::KillableThreadActivity
 

Namespaces

namespace  ifw
 
namespace  ifw::slm
 

Detailed Description

KillableThreadActivity - a thread-based activity with timed join.

Extends rad::ThreadBaseActivity directly (parallel to rad::ThreadActivity) and provides a non-blocking JoinThread() using pthread_timedjoin_np.

If the activity thread does not terminate within a configurable timeout (default 2 seconds), it is detached and the SM is allowed to continue. This prevents a stuck activity (e.g. blocked on a remote endpoint) from freezing the entire state machine.