discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Checking that a flowgraph is done


From: Andrej Rode
Subject: Re: [Discuss-gnuradio] Checking that a flowgraph is done
Date: Fri, 6 Oct 2017 17:41:05 +0200
User-agent: Mutt/1.7.2 (2016-11-26)

Hi Gilad, 

On Fri, Oct 06, 2017 at 03:17:52PM +0000, Gilad Beeri (ApolloShield) wrote:
> I have a flowgraph used for simulations that uses a File Source with no
> repeat.
> I want to run some code after the flowgraph is done (-> when the source
> returns -1).
> How can I achieve that?

If you are ok with the flowgraph blocking your current thread you could
call `run()` on the top_block. Or you could continue doing other
calculations on your data after calling `start()` and then call `wait()`
on the top_block. `wait()` will either block until the flow graph is
done or return immediatly if the flowgraph was done already. In either
case you can be sure the flowgraph is done.

Cheers
Andrej

-- 
Andrej Rode
GPG Key: 750B CBBB 4A75 811A 4D5F 03ED 5C23 7FB8 9A7D A2AA

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]