C# Class Fanx.Util.Scheduler

Scheduler is used to schedule work to be run after an elapsed period of time. It is optimized for use with the actor framework. Scheduler lazily launches a background thread the first time an item of work is scheduled.
Show file Open project: xored/f4

Public Methods

Method Description
Scheduler ( ) : System.Runtime.CompilerServices

Constructor.

dump ( ) : void

Debug

run ( ) : void

Private Methods

Method Description
add ( long ns, Work work ) : bool

Add the work item into the linked list so that the list is always sorted by earliest deadline to oldest deadline. Return true if we have a new head which changes our next earliest deadline.

schedule ( long ns, Work work ) : void
stop ( ) : void

Method Details

Scheduler() public method

Constructor.
public Scheduler ( ) : System.Runtime.CompilerServices
return System.Runtime.CompilerServices

dump() public method

Debug
public dump ( ) : void
return void

run() public method

public run ( ) : void
return void