Merged r7478:7608 from michaelld/t186 into trunk. Adds ability to compile GNU Radio...
[debian/gnuradio] / gnuradio-core / src / lib / runtime / gr_top_block.cc
index 407df8bbac822600cb3637341eace7a424d822b3..b2523afc9ba46deee8cbdebd2b1c4f26605ef722 100644 (file)
@@ -24,6 +24,7 @@
 #include "config.h"
 #endif
 
+#include <unistd.h>
 #include <gr_top_block.h>
 #include <gr_top_block_impl.h>
 #include <gr_io_signature.h>
@@ -46,6 +47,9 @@ gr_top_block::gr_top_block(const std::string &name)
   
 gr_top_block::~gr_top_block()
 {
+  stop();
+  wait();
+    
   delete d_impl;
 }
 
@@ -85,3 +89,9 @@ gr_top_block::unlock()
 {
   d_impl->unlock();
 }
+
+bool
+gr_top_block::is_running()
+{
+  return d_impl->is_running();
+}