Skip to main content

ConcurrentExecutor

Classes

ConcurrentExecutor

Functions

isGroupTask(t)boolean
tryResolve(unresolvedTask)number

ConcurrentExecutor

Kind: global class

new ConcurrentExecutor([quietTime], [workTime])

ParamTypeDefaultDescription
[quietTime]number1in milliseconds
[workTime]number15in 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

ParamType
taskGroupTaskGroup

concurrentExecutor.removeGroup(group)

Kind: instance method of ConcurrentExecutor

ParamType
groupTaskGroup

concurrentExecutor.removeTask(task) ⇒ boolean

Kind: instance method of ConcurrentExecutor

ParamType
taskTask

concurrentExecutor.run(task)

Kind: instance method of ConcurrentExecutor

ParamType
taskTask

concurrentExecutor.runMany(tasks)

Shortcut for #run method for scheduling multiple tasks at once

Kind: instance method of ConcurrentExecutor

ParamType
tasksArray.<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

ParamType
taskTask

SchedulingPolicy : enum

Kind: global enum
Read only: true
Properties

NameTypeDefault
ROUND_ROBINnumber0
SEQUENTIALnumber1
TIME_SLICEnumber2

isGroupTask(t) ⇒ boolean

Kind: global function

ParamType
tTaskGroup | Task

tryResolve(unresolvedTask) ⇒ number

Kind: global function

ParamType
unresolvedTaskTask