(index ("process-name" 0) ("start" 377))
(def (sig (procedure "(process-name)" (id process-name))) (p "Returns a value that's unique to the worker process from which it's called. Currently, this is simply the worker's process ID.") (p "When called from within the server process, some descriptive object is returned. Exactly what type of object is unspecified.") (p "This value can be changed with " (tt "set!") "."))
(def (sig (procedure "(start producer #!optional consumer logger fixnum)" (id start))) (p "Starts a job server.") (p "When started, the server loops indefinitely, calling " (tt "producer") " to generate workers and jobs to be dispatched. If there are no jobs to run, it is the " (tt "producer") "'s responsibility to block until one becomes available. To stop the server, " (tt "producer") " should raise the " (tt "#:stop") " keyword.") (p "The final argument to " (tt "start") " sets the maximum number of concurrent workers the job server will use. The default value is " (tt "4") ".") (p "Each worker is executed in a dedicated OS-level process. A worker receives as a single argument the job with which it was produced, and its result is passed back to the " (tt "consumer") " in the server process. Worker arguments and results must be fully read/write-invariant.") (p "The " (tt "consumer") " procedure is invoked with each completed job and its result. Its own result is discarded.") (p "Each job server uses its thread's \"specific\" data slot for bookkeeping and installs a " (tt "SIGINT") " handler that will cause the server to shut down cleanly on interrupt. It's recommended that each job server be run in a dedicated thread."))
