class documentation

class _JobProcessor(object):

View In Hierarchy

Undocumented

Method __call__ Continues execution of a job.
Method __init__ Initializes this class.
Constant DEFER Undocumented
Constant FINISHED Undocumented
Constant WAITDEP Undocumented
Instance Variable job Undocumented
Instance Variable opexec_fn Undocumented
Instance Variable queue Undocumented
Static Method _CheckDependencies Checks if an opcode has dependencies and if so, processes them.
Static Method _FindNextOpcode Locates the next opcode to run.
Static Method _MarkWaitlock Marks an opcode as waiting for locks.
Method _ExecOpCodeUnlocked Processes one opcode and returns the result.
Instance Variable _timeout_strategy_factory Undocumented
def __call__(self, _nextop_fn=None):

Continues execution of a job.

Parameters
_nextop_fnCallback function for tests
Returns
FINISHED if job is fully processed, DEFER if the job should be deferred and WAITDEP if the dependency manager (_JobDependencyManager) will re-schedule the job when appropriate
def __init__(self, queue, opexec_fn, job, _timeout_strategy_factory=mcpu.LockAttemptTimeoutStrategy):

Initializes this class.

DEFER =

Undocumented

FINISHED =

Undocumented

WAITDEP =

Undocumented

job =

Undocumented

opexec_fn =

Undocumented

queue =

Undocumented

@staticmethod
def _CheckDependencies(queue, job, opctx):

Checks if an opcode has dependencies and if so, processes them.

Parameters
queue:JobQueueQueue object
job:_QueuedJobJob object
opctx:_OpExecContextOpcode execution context
Returns
boolWhether opcode will be re-scheduled by dependency tracker
@staticmethod
def _FindNextOpcode(job, timeout_strategy_factory):

Locates the next opcode to run.

Parameters
job:_QueuedJobJob object
timeout_strategy_factoryCallable to create new timeout strategy
@staticmethod
def _MarkWaitlock(job, op):

Marks an opcode as waiting for locks.

The job's start timestamp is also set if necessary.

Parameters
job:_QueuedJobJob object
op:_QueuedOpCodeOpcode object
def _ExecOpCodeUnlocked(self, opctx):

Processes one opcode and returns the result.

_timeout_strategy_factory =

Undocumented