ReopenableFilesApp.SendingTask

Task used to send command and confirm the response

Constructors

this
this(cstring command_to_send, cstring expected_response)

Constructor

Members

Functions

run
void run()

Main task method

Variables

command_to_send
cstring command_to_send;

Command to send

expected_response
cstring expected_response;

Response to expect

Inherited Members

From Task

object_pool_index
size_t object_pool_index;

Reserved index field which ensures that any Task derivative can be used with ObjectPool. That comes at minor cost of one unused size_t per Task instance if not needed which is not a problem.

fiber
WorkerFiber fiber;

Fiber this task executes in

getThis
Task getThis()
assignTo
void assignTo(WorkerFiber fiber, void delegate() entry_point)

Assigns the task to a fiber. In most cases you need to use Scheduler.schedule instead.

suspend
void suspend()

Suspends execution of this task.

resume
void resume()

Resumes execution of this task. If task has not been started yet, starts it.

terminationHook
void terminationHook(void delegate() hook)

Registers a termination hook that will be executed when the Task is killed.

removeTerminationHook
void removeTerminationHook(void delegate() hook)

Unregisters a termination hook that would be executed when the Task is killed.

suspended
bool suspended()
finished
bool finished()
kill
void kill(istring file, int line)

Forces abnormal termination for the task by throwing special exception instance.

recycle
void recycle()

Method that will be run by scheduler when task finishes. Must be overridden by specific task class to reset reusable resources.

run
void run()

Method that must be overridden in actual application/library task classes to provide entry point.

entryPoint
bool entryPoint()

Internal wrapper around this.run() which is used as primary fiber entry point and ensures any uncaught exception propagates to the context that has started this task.

Meta