exopy.measurement.engines.utils module

Useful tools for engines.

class exopy.measurement.engines.utils.MeasureSpy(queue, observed_entries, observed_database)[source]

Bases: atom.atom.Atom

Spy observing a task database and sending values update into a queue.

All updates are sent immediatly as no issues have been detected so far. Using a timer based implementation would complicate things.

observed_entries

Set of entries for which to send notifications.

observed_database

Reference to the database that needs to be observed.

queue

Queue in which to send the updates.

enqueue_update(change)[source]

Put an update in the queue.

Notes

Change is a tuple as this is connected to a Signal.

close()[source]

Put a dummy object signaling that no more updates will be sent.

class exopy.measurement.engines.utils.ThreadMeasureMonitor(engine, queue)[source]

Bases: threading.Thread

Thread sending a queue content to the news signal of an engine.

run()[source]

Send the news received from the queue to the engine news signal.