From 78f92682772293445af1e3f9e55cbf7f8784b158 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 4 Jun 2015 11:30:34 +0800 Subject: [PATCH] worker: add note about correct use of close() --- artiq/master/worker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/master/worker.py b/artiq/master/worker.py index af7a08990..bb89907f4 100644 --- a/artiq/master/worker.py +++ b/artiq/master/worker.py @@ -75,6 +75,11 @@ class Worker: @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: