summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/guile
diff options
context:
space:
mode:
authorEric Blossom2010-11-20 16:30:43 -0800
committerEric Blossom2010-11-20 16:30:43 -0800
commit6551f537ed235bbb0ddfadb50744ea3b3fcbc2e6 (patch)
treeb75ba0a18309649f2b64f2b1f7325373ddf2bef2 /gnuradio-core/src/guile
parent37a1e931c11f2ba0bdd8ef9ff07c6710e83c6139 (diff)
downloadgnuradio-6551f537ed235bbb0ddfadb50744ea3b3fcbc2e6.tar.gz
gnuradio-6551f537ed235bbb0ddfadb50744ea3b3fcbc2e6.tar.bz2
gnuradio-6551f537ed235bbb0ddfadb50744ea3b3fcbc2e6.zip
Add guile shim to gr_top_block::wait that exits guile mode before blocking.
Diffstat (limited to 'gnuradio-core/src/guile')
-rw-r--r--gnuradio-core/src/guile/gnuradio/runtime-shim.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnuradio-core/src/guile/gnuradio/runtime-shim.scm b/gnuradio-core/src/guile/gnuradio/runtime-shim.scm
index c08d3947c..105f4ddb8 100644
--- a/gnuradio-core/src/guile/gnuradio/runtime-shim.scm
+++ b/gnuradio-core/src/guile/gnuradio/runtime-shim.scm
@@ -86,4 +86,15 @@
(loop (1+ n))))))))))
-(export-safely <gr-endpoint> gr:ep gr:connect gr:disconnect)
+
+
+(define-method (gr:run (self <gr-top-block-sptr>))
+ (gr:start self)
+ (gr:wait self))
+
+(define-method (gr:wait (self <gr-top-block-sptr>))
+ ;; FIXME Set up SIGINT handling here...
+ (gr:top-block-wait-unlocked self))
+
+
+(export-safely <gr-endpoint> gr:ep gr:connect gr:disconnect gr:run gr:wait)