iblrig.tools.InputThread

Inheritance diagram of InputThread

class iblrig.tools.InputThread[source]

A thread that reads input from stdin and invokes a callback function for each line read.

__init__(callback)[source]

Initialize the InputThread.

Parameters:

callback (Callable) – A function that will be called with each line of input read from stdin.

Parameters:

callback (Callable[[bytes], None])

Return type:

None

run()[source]

Continuously reads lines from standard input and passes them to the callback function until thread is terminated.

Return type:

None