JobQueue
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
Run work a few pieces at a time, with pausing and retries, and a Job for each piece to wait on, show or cancel.
Insert a JobQueue in the project tree and set MaxRunning in Properties, or make one with ProgramService's CreateJobQueue(name, maxRunning). Add queues a piece of work and gives its Job, a child of the queue while it waits or runs. While Paused, running jobs finish and waiting ones wait.
Made with Instance.new("JobQueue") or Clone().
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| MaxRunning | number | How many jobs run at once; set it in Properties when the queue sits in the project tree. | |
| Paused | boolean | While true, running jobs finish and waiting ones wait. | |
| RunningCount | number | ||
| WaitingCount | number |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| Add | (name: string, work: () -> any, options: { Retries: number?, RetryDelay: number? }?) | Job | Queues the work under a name and returns its Job; the work may call Async members. |
| Clear | () | () | Cancels every waiting job. |
Events
| Name | Passes | Description |
|---|---|---|
| JobAdded | (Job) | |
| Emptied | () |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
