project8 / dripline

Slow controls for medium scale physics experiments based on AMQP centralized messaging
http://www.project8.org/dripline
1 stars 0 forks source link

Purge threading #98

Closed laroque closed 9 years ago

laroque commented 9 years ago

It may still be required that we use Multiprocessing (for internal requests with timeouts or other non-blocking function calls), but the Threading library should be removed. Thread-safety is subtle and ensuring it makes code much harder to read/understand/maintain. The SelectConnection's add_timer method should allow loggers to be refactored without it, and in a way that uses cleaner and more performant asynchronous programming.

Doing this is dependent upon completion of #95 and is almost a duplicate of that issue, except that here we add grepping the codebase and ensuring that it gets fully removed.

laroque commented 9 years ago

I've purged all use of threading, except in the ethernet_scpi module. There it is used to ensure that, in the case of a slow response, new data is not sent over an ethernet socket until the current command has been sent and reply received (possibly creating confusion as to which return packet is for which command).

In that particular case it seems okay so I'll leave it in.