Disconnecting in a running flow graph

Hello,

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.start()

time.sleep(1)

fg.disconnect(src, sink)
time.sleep(1)

fg.connect(src, sink)
time.sleep(1)

fg.stop()


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.

Thanks,
-Josh