jobhandlers

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph cluster_abc { graph [label=abc]; node [color=1]; "abc.ABC" [URL="https://docs.python.org/3.10/library/abc.html#abc.ABC", label=ABC, target=_top]; } subgraph "cluster_abjadext.nauert.jobhandlers" { graph [label="abjadext.nauert.jobhandlers"]; node [color=2]; "abjadext.nauert.jobhandlers.JobHandler" [URL="../api/abjadext/nauert/jobhandlers.html#abjadext.nauert.jobhandlers.JobHandler", color=black, fontcolor=white, label="Job\nHandler", shape=oval, style="bold, filled", target=_top]; "abjadext.nauert.jobhandlers.ParallelJobHandler" [URL="../api/abjadext/nauert/jobhandlers.html#abjadext.nauert.jobhandlers.ParallelJobHandler", color=black, fontcolor=white, label="Parallel\nJob\nHandler", target=_top]; "abjadext.nauert.jobhandlers.ParallelJobHandlerWorker" [URL="../api/abjadext/nauert/jobhandlers.html#abjadext.nauert.jobhandlers.ParallelJobHandlerWorker", color=black, fontcolor=white, label="Parallel\nJob\nHandler\nWorker", target=_top]; "abjadext.nauert.jobhandlers.SerialJobHandler" [URL="../api/abjadext/nauert/jobhandlers.html#abjadext.nauert.jobhandlers.SerialJobHandler", color=black, fontcolor=white, label="Serial\nJob\nHandler", target=_top]; "abjadext.nauert.jobhandlers.JobHandler" -> "abjadext.nauert.jobhandlers.ParallelJobHandler"; "abjadext.nauert.jobhandlers.JobHandler" -> "abjadext.nauert.jobhandlers.SerialJobHandler"; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.10/library/functions.html#object", label=object, target=_top]; } subgraph "cluster_multiprocessing.context" { graph [label="multiprocessing.context"]; node [color=4]; "multiprocessing.context.Process" [label=Process]; } subgraph "cluster_multiprocessing.process" { graph [label="multiprocessing.process"]; node [color=5]; "multiprocessing.process.BaseProcess" [label="Base\nProcess"]; } "abc.ABC" -> "abjadext.nauert.jobhandlers.JobHandler"; "builtins.object" -> "abc.ABC"; "builtins.object" -> "multiprocessing.process.BaseProcess"; "multiprocessing.context.Process" -> "abjadext.nauert.jobhandlers.ParallelJobHandlerWorker"; "multiprocessing.process.BaseProcess" -> "multiprocessing.context.Process"; }


Abstract Classes

JobHandler

Abstact job-handler.

abstract class abjadext.nauert.jobhandlers.JobHandler[source]

Abstact job-handler.

JobHandlers control how QuantizationJob instances are processed by the quantize function, either serially or in parallel.


Attributes Summary

__call__

Calls job handler.


Special methods

overridden abstract __call__(jobs)[source]

Calls job handler.


Classes

ParallelJobHandler

Parallel job-handler.

ParallelJobHandlerWorker

Parallel job-handler worker.

SerialJobHandler

Serial job-handler.

class abjadext.nauert.jobhandlers.ParallelJobHandler[source]

Parallel job-handler.

Processes QuantizationJob instances in parallel, based on the number of CPUs available.


Attributes Summary

__call__

Calls parallel job handler.


Special methods

overridden __call__(jobs)[source]

Calls parallel job handler.

class abjadext.nauert.jobhandlers.ParallelJobHandlerWorker(job_queue=None, result_queue=None)[source]

Parallel job-handler worker.

Worker process which runs QuantizationJobs.

Not composer-safe.

Used internally by ParallelJobHandler.


Attributes Summary

run

Runs parallel job handler worker.


Special methods

(BaseProcess).__repr__()

Return repr(self).


Methods

(BaseProcess).close()

Close the Process object.

This method releases resources held by the Process object. It is an error to call this method if the child process is still running.

(BaseProcess).is_alive()

Return whether process is alive

(BaseProcess).join(timeout=None)

Wait until child process terminates

(BaseProcess).kill()

Terminate process; sends SIGKILL signal or uses TerminateProcess()

overridden run()[source]

Runs parallel job handler worker.

Returns none.

(BaseProcess).start()

Start child process

(BaseProcess).terminate()

Terminate process; sends SIGTERM signal or uses TerminateProcess()


Read/write properties

(BaseProcess).authkey
(BaseProcess).daemon

Return whether process is a daemon

(BaseProcess).name

Read-only properties

(BaseProcess).exitcode

Return exit code of process or None if it has yet to stop

(BaseProcess).ident

Return identifier (PID) of process or None if it has yet to start

(BaseProcess).pid

Return identifier (PID) of process or None if it has yet to start

(BaseProcess).sentinel

Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.

class abjadext.nauert.jobhandlers.SerialJobHandler[source]

Serial job-handler.


Attributes Summary

__call__

Calls serial job handler.


Special methods

overridden __call__(jobs)[source]

Calls serial job handler.

Returns jobs.

Return type:

Sequence[QuantizationJob]