Generator-based interface to make it easier to work in an asynchronous environment.
Queued version of the
Prevents calling of the wrapped function if there is already one instance of the function running asynchronously. Function will be called synchronously without blocking io_loop.
This decorator can only be used on class methods, as it requires
selfto make sure that calls are scheduled on instance level (connection) instead of class level (method).