# Disconnecting in a running flow graph

**URL:** <https://www.ruby-forum.com/t/disconnecting-in-a-running-flow-graph/105195>\
**Category:** GNU Radio\
**Created:** [May 27, 2007, 1:20am UTC](https://www.ruby-forum.com/t/disconnecting-in-a-running-flow-graph/105195 "2007-05-27T01:20:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@Josh\_B](https://www.ruby-forum.com/u/Josh_B)\
**Post date:** [May 27, 2007, 1:20am UTC](https://www.ruby-forum.com/t/disconnecting-in-a-running-flow-graph/105195/1 "2007-05-27T01:20:02Z")

</div>

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
