Disconnecting in a running flow graph


I am interested in breaking a connection inside a running flow graph. I
have tried to narrow down the problem in a simple example, but I cannot
get the disconnect call to have any effect.

The example below should make a beep, silence, beep:

import time
from gnuradio import gr
from gnuradio import audio

fg = gr.flow_graph()

src = gr.sig_source_f(32000, gr.GR_SIN_WAVE, 350, .5, 0)
sink = audio.sink(32000)

fg.connect(src, sink)


fg.disconnect(src, sink)

fg.connect(src, sink)


What I am doing wrong?

Maybe I misunderstood the conclusion from the “rearranging a running
flow graph” email. It seemed to me that all blocks (including
hier_blocks2) but not hier_blocks could be disconnected.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs