From 1f50b3428e7d04d4d7b4b7ffeadbd65fdfc31a4b Mon Sep 17 00:00:00 2001
From: Sebastien Bourdeauducq <sb@m-labs.hk>
Date: Tue, 12 Apr 2016 15:46:21 +0800
Subject: [PATCH] coredevice: automatically close on pause

---
 RELEASE_NOTES.rst                | 2 ++
 artiq/coredevice/comm_generic.py | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index 1192737fa..d154dbeb1 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -30,6 +30,8 @@ unreleased [2.x]
 
   (you may need to replace python3.5 with python)
   Please always include the console output when reporting a GUI crash.
+* Closing the core device communications before pausing is done automatically.
+  Experiments no longer need to do it explicitly.
 
 
 unreleased [1.0rc3]
diff --git a/artiq/coredevice/comm_generic.py b/artiq/coredevice/comm_generic.py
index 31f3ccccb..4e6b70d61 100644
--- a/artiq/coredevice/comm_generic.py
+++ b/artiq/coredevice/comm_generic.py
@@ -87,6 +87,10 @@ class CommGeneric:
         The channel is assumed to be opened."""
         raise NotImplementedError
 
+
+    def pause(self):
+        self.close()
+
     #
     # Reader interface
     #