rsudp.p_producer (data producer)

class rsudp.p_producer.Producer(queue, threads, testing=False)

Data Producer thread (see Producer-consumer message passing) which receives data from the port and puts it on the queue to be passed to the master consumer (rsudp.c_consumer.Consumer). The producer also looks for flags in each consumer that indicate whether they are alive==False. If so, the Producer will quit gracefully and put a TERM message on the queue, which should stop all running consumers.

Parameters:
run()

Distributes queue objects to execute various other tasks: for example, it may be used to populate ObsPy streams for various things like plotting, alert triggers, and ground motion calculation.


Back to top ↑