Merged r6171:6186 from jcorgan/fg into trunk.
[debian/gnuradio] / gnuradio-core / src / python / gnuradio / gr / hier_block2.py
index 4699bb6fe18c10c55e595238fa45d1c7918cae0b..bc6402b8726ef2a0efaa941b095e528940246e8c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -19,9 +19,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-from gnuradio_swig_python import hier_block2_swig, gr_make_runtime, \
-    runtime_run_unlocked, runtime_start_unlocked, runtime_stop_unlocked, \
-    runtime_wait_unlocked, runtime_restart_unlocked, io_signature
+from gnuradio_swig_python import hier_block2_swig
 
 #
 # This hack forces a 'has-a' relationship to look like an 'is-a' one.
@@ -77,34 +75,3 @@ class hier_block2(object):
         self._hb.disconnect(src_block.basic_block(), src_port,
                             dst_block.basic_block(), dst_port)
 
-# Convenience class to create a no input, no output block for runtime top block
-class top_block(hier_block2):
-    def __init__(self, name):
-        hier_block2.__init__(self, name, io_signature(0,0,0), io_signature(0,0,0))
-
-# This allows the 'run_locked' methods, which are defined in gr_runtime.i,
-# to release the Python global interpreter lock before calling the actual
-# method in gr.runtime
-#
-# This probably should be elsewhere but it works here
-class runtime(object):
-    def __init__(self, top_block):
-        if (isinstance(top_block, hier_block2)):
-            self._r = gr_make_runtime(top_block._hb)            
-        else:
-            self._r = gr_make_runtime(top_block)
-
-    def run(self):
-        runtime_run_unlocked(self._r)
-
-    def start(self):
-        runtime_start_unlocked(self._r)
-
-    def stop(self):
-        runtime_stop_unlocked(self._r)
-
-    def wait(self):
-        runtime_wait_unlocked(self._r)
-
-    def restart(self):
-        runtime_restart_unlocked(self._r)