agent::cancel Method

Moves an agent from either the agent_created or agent_runnable states to the agent_canceled state.

bool cancel();

Return Value

true if the agent was canceled, false otherwise. An agent cannot be canceled if it has already started running or has already completed.

Requirements

Header: agents.h

Namespace: concurrency

See Also

Reference

agent Class

agent_status Enumeration