# Are there any Gnuradio Events?

**URL:** <https://www.ruby-forum.com/t/are-there-any-gnuradio-events/207764>\
**Category:** GNU Radio\
**Created:** [June 2, 2011, 3:54am UTC](https://www.ruby-forum.com/t/are-there-any-gnuradio-events/207764 "2011-06-02T03:54:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [June 2, 2011, 3:54am UTC](https://www.ruby-forum.com/t/are-there-any-gnuradio-events/207764/1 "2011-06-02T03:54:07Z")

</div>

Lets say you have a GUI app that has a fixed runtime determined by a  
head block set to (sample\_rate \* n\_seconds). Currently, the gui keeps  
running. Is there an OnShutdown or some function I can override to catch  
the flowgraph completion? Worst case, can I set up a loop thread to  
check tb.is\_running or something to that effect?

---

<div class="post-metadata">

**Author:** ![Brett\_LSTrotter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@Brett\_LSTrotter](https://www.ruby-forum.com/u/Brett_LSTrotter)\
**Post date:** [June 3, 2011, 10:01am UTC](https://www.ruby-forum.com/t/are-there-any-gnuradio-events/207764/2 "2011-06-03T10:01:52Z")

</div>

Sure, there’s the upcoming GNU Radio conference 🙂  
SCNR…

On Wed, Jun 01, 2011 at 01:28:51PM -0500, Brett L. Trotter wrote:

> Lets say you have a GUI app that has a fixed runtime determined by a  
> head block set to (sample\_rate \* n\_seconds). Currently, the gui keeps  
> running. Is there an OnShutdown or some function I can override to catch  
> the flowgraph completion? Worst case, can I set up a loop thread to  
> check tb.is\_running or something to that effect?

tb.wait() is a blocking function, so you could use that to create a  
trigger for your own event.

MB

–  
Karlsruhe Institute of Technology (KIT)  
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.  
Research Associate

Kaiserstraße 12  
Building 05.01  
76131 Karlsruhe

Phone: +49 721 608-43790  
Fax: +49 721 608-46071  
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and  
National Laboratory of the Helmholtz Association

---

<div class="post-metadata">

**Author:** ![Brett\_LSTrotter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@Brett\_LSTrotter](https://www.ruby-forum.com/u/Brett_LSTrotter)\
**Post date:** [June 6, 2011, 4:58pm UTC](https://www.ruby-forum.com/t/are-there-any-gnuradio-events/207764/3 "2011-06-06T16:58:31Z")

</div>

On Fri, Jun 3, 2011 at 3:57 AM, Martin B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> tb.wait() is a blocking function, so you could use that to create a  
> trigger for your own event.
> 
> MB

Yes, there is no event generated that you can look for (unless Eric has  
sneaked something in there that I haven’t seen or heard of, which is not  
completely out of the question). I’d take Martin’s advice and have your  
own  
watcher thread that waits on the flowgraph completion and then does  
whatever  
it is you need it to do.

Tom
