ConcurrentExecutor
Classes
Functions
- isGroupTask(t) ⇒
boolean
- tryResolve(unresolvedTask) ⇒
number
ConcurrentExecutor
Kind: global class
- ConcurrentExecutor
- new ConcurrentExecutor([quietTime], [workTime])
- .quietTime :
number
- .workTime :
number
- .queueUnresolved :
Array.<Task>
- .queueReady :
Array.<Task>
- .policy :
number
|SchedulingPolicy
- .runGroup(taskGroup)
- .removeGroup(group)
- .removeTask(task) ⇒
boolean
- .run(task)
- .runMany(tasks)
- .resolveTasks()
- .contains(task) ⇒
boolean
new ConcurrentExecutor([quietTime], [workTime])
Param | Type | Default | Description |
---|---|---|---|
[quietTime] | number | 1 | in milliseconds |
[workTime] | number | 15 | in milliseconds |
concurrentExecutor.quietTime : number
Kind: instance property of ConcurrentExecutor
concurrentExecutor.workTime : number
Kind: instance property of ConcurrentExecutor
concurrentExecutor.queueUnresolved : Array.<Task>
Tasks in state pending resolution or initial sate are put here
Kind: instance property of ConcurrentExecutor
concurrentExecutor.queueReady : Array.<Task>
ready tasks are those who's dependencies have all been completed
Kind: instance property of ConcurrentExecutor
concurrentExecutor.policy : number
| SchedulingPolicy
Kind: instance property of ConcurrentExecutor
concurrentExecutor.runGroup(taskGroup)
Kind: instance method of ConcurrentExecutor
Param | Type |
---|---|
taskGroup | TaskGroup |
concurrentExecutor.removeGroup(group)
Kind: instance method of ConcurrentExecutor
Param | Type |
---|---|
group | TaskGroup |
concurrentExecutor.removeTask(task) ⇒ boolean
Kind: instance method of ConcurrentExecutor
Param | Type |
---|---|
task | Task |
concurrentExecutor.run(task)
Kind: instance method of ConcurrentExecutor
Param | Type |
---|---|
task | Task |
concurrentExecutor.runMany(tasks)
Shortcut for #run method for scheduling multiple tasks at once
Kind: instance method of ConcurrentExecutor
Param | Type |
---|---|
tasks | Array.<Task> |
concurrentExecutor.resolveTasks()
Go through unresolved queue and move tasks whose dependencies have been completed to ready queue or fail them
Kind: instance method of ConcurrentExecutor
concurrentExecutor.contains(task) ⇒ boolean
Kind: instance method of ConcurrentExecutor
Param | Type |
---|---|
task | Task |
SchedulingPolicy : enum
Kind: global enum
Read only: true
Properties
Name | Type | Default |
---|---|---|
ROUND_ROBIN | number | 0 |
SEQUENTIAL | number | 1 |
TIME_SLICE | number | 2 |
isGroupTask(t) ⇒ boolean
Kind: global function
Param | Type |
---|---|
t | TaskGroup | Task |
tryResolve(unresolvedTask) ⇒ number
Kind: global function
Param | Type |
---|---|
unresolvedTask | Task |