Skip to content

Commit

Permalink
worker: add note about correct use of close()
Browse files Browse the repository at this point in the history
sbourdeauducq committed Jun 4, 2015
1 parent d730066 commit 78f9268
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions artiq/master/worker.py
Original file line number Diff line number Diff line change
@@ -75,6 +75,11 @@ def _create_process(self):

@asyncio.coroutine
def close(self):
"""Interrupts any I/O with the worker process and terminates the
worker process.
This method should always be called by the user to clean up, even if
prepare() raises an exception."""
self.closed.set()
yield from self.io_lock.acquire()
try:

0 comments on commit 78f9268

Please sign in to comment.