ska-sa/katcp-python — pull request #27 by brickZA (2014-09-25 13:28:17+00:00)
Title: Refactor katcp DeviceClient and subclasses to use tornado ioloop

Also minor changes to the blocking_request API to always return errors via fail messages rather than raising exceptions.

Added various unit_*() methods as async-safe wait_*() equivalents that return tornado.concurrent.Future objects.

New implementation is called AsyncClient, and is, by default, not thread-safe. Has a mechanism for enabling thread-safe APIs using make_threadsafe() and make_threadsafe_blocking() decorators. If enable_thread_safety() is called, these methods are wrapped in decorators that ensure thread-safety, but comes with a performance cost.

The CallbackClient and BlockingClient compatibilty subclasses (they are identical) call enable_thread_safety() in their __init__() methods to ensure backwards compatibility.