libgs.monitoring.Monitor.to_gen_in_executor

Monitor.to_gen_in_executor(fn, point_names, *args, **kwargs)[source]

This decorator will take any function and turn it into a generator that always returns immediately after calls to next().

The call to fn is being delegated to an executor, and while it is not done, calls to next() will return None, otherwise it will return a tuple containging

  • the timestamp the data the return

value of fn

Parameters:fn

Returns: