core.dispatch module

basic package for the program.

class Dispatcher(zelf, *args, **kwargs)[source]

Bases: core.Object

the dispatcher delegates the workload to the Runners. Runner gets instantiated when needed.

allowed(zelf, *args, **kwargs)[source]
cleanup(zelf, dojoin=False)[source]

remove idle Runners.

denied(zelf, *args, **kwargs)[source]
dispatch(zelf, *args, **kwargs)[source]

dispatch an event onto a Runner.

execute(zelf, *args, **kwargs)[source]

execute a command, event pair.

exit(zelf, name=None)[source]

stop the Runners.

is_alive(zelf, *args, **kwargs)[source]

whether any Runners running.

make_new(zelf, *args, **kwargs)[source]

create a Runner.

put(zelf, *args, **kwargs)[source]

put load to the Runner.

register(zelf, *args, **kwargs)[source]

callback type with corresponding callback function.

run_func(zelf, *args, **kwargs)[source]

execute command/event pair.

class Runner(zelf, *args, **kwargs)[source]

Bases: threading.Thread

the working unit of CORELIB.

clear(zelf)[source]

clear the ready state.

exit(zelf, *args, **kwargs)[source]

stop the Runner.

get_name(zelf, *args, **kwargs)[source]
nr = 0
put(zelf, *args, **kwargs)[source]

put arguments/kwargs to the Runner.

ready(zelf)[source]

signal to ready state.

wait(zelf, sec=180.0)[source]

wait for ready state.