Prajna


WorkerRoleInstance

WorkerRoleInstance can be extended to run a Prajna worker service. Unlike WorkerRoleEntryPoint, WorkerRoleInstance is to be instantiated at the remote end so it is class member is not serialized.

Constructors

ConstructorDescription
new()
Signature: unit -> WorkerRoleInstance

Instance members

Instance memberDescription
EvTerminated
Signature: ManualResetEvent

When an instance terminates it should set EvTerminated flag so that parent instance may terminate

IsRunning()
Signature: unit -> bool
Modifiers: abstract

bool IsRunning(): return true if the service is running (should be set at OnStart), false if the service terminates.

OnStartByObject(arg1)
Signature: Object -> bool
Modifiers: abstract

bool OnStart(): Run once when the service instance started for all thread, it will be runned in each thread.

OnStop()
Signature: unit -> unit
Modifiers: abstract

bool OnStop(): Run once to stop all thread,

Run()
Signature: unit -> unit
Modifiers: abstract

void Run(): main entry point when the service is running,

Fork me on GitHub