HasMeasureTrigger Daemon: client shutdown gives error
Using picotech-adc-triggered
daemon, so it might be the reason for this issue, but my best guess is that it's a yaqd core issue. I am not sure how much shutdown has been tested (especially on HasMeasureTrigger daemons?).
>>> import yaqc
>>> c = yaqc.Client([port])
>>> c.shutdown()
Feedback from daemon:
<6> INFO : 2020-12-30T23:54:15-0600 : scope : Shutting Down scope
<6> INFO : 2020-12-30T23:54:15-0600 : scope : Cancelling 2 outstanding tasks
<6> INFO : 2020-12-30T23:54:15-0600 : scope : Connection lost from ('127.0.0.1', 54216) to scope
exception calling callback for <Future at 0x22b25735f08 state=finished returned dict>
Traceback (most recent call last):
File "~\Anaconda3\lib\concurrent\futures\_base.py", line 324, in _invoke_callbacks
callback(self)
File "~\Anaconda3\lib\asyncio\futures.py", line 362, in _call_set_state
dest_loop.call_soon_threadsafe(_set_state, destination, source)
File "~\Anaconda3\lib\asyncio\base_events.py", line 728, in call_soon_threadsafe
self._check_closed()
File "~\Anaconda3\lib\asyncio\base_events.py", line 475, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending coro=<HasMeasureTrigger._runner() running at ~\Documents\source\yaq-python\yaqd-core\yaqd_core\_has_measure_trigger.py:56> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at ~\Anaconda3\lib\asyncio\futures.py:348, <TaskWakeupMethWrapper object at 0x0000022B2573D678>()]>>
From inspection, I know the daemon makes it through IsDaemon.shutdown
clean, and the error is thrown afterwards.