Job Queue
8.18
top
← prev up next →

Job QueueπŸ”— i

Jay McCarthy <jay@racket-lang.org>

A multi-threaded job queue.

An identifier for the current worker, or #f outside a manager.

procedure

( job-queue? v)boolean?

v:any/c

Returns true if v is a job queue.

procedure

( make-job-queue how-many-workers)job-queue?

how-many-workers:exact-nonnegative-integer?

Starts a queue with how-many-workers threads servicing jobs.

procedure

( submit-job! jqjob)void

job:(-> any )

Runs job by one of jq’s workers. job is run in the same parameterization as the call to submit-job! . This call will never block.

procedure

( stop-job-queue! jq)void

Blocks until all of jq’s current jobs are finished and its workers are dead. Once stop-job-queue! has been called, jq will reject subsequent requests and submit-job! will block indefinitely.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /