added sleep to infinite queue checking loop to reduce CPU contention

git-svn-id: http://op25.osmocom.org/svn/trunk@190 65a5c917-d112-43f1-993d-58c26a4786be
This commit is contained in:
mossmann 2009-12-03 06:05:53 +00:00
parent 00e43b6080
commit ccfede8fb2
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,7 @@ you should start this program beforehand, to start the data flow.
"""
import math
import time
from gnuradio import gr, gru, audio, eng_notation, blks2, optfir
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@ -80,6 +80,7 @@ def main():
try:
tb.start()
while 1:
time.sleep(1)
if not queue.empty_p():
sys.stderr.write("main: q.delete_head()\n")
msg = queue.delete_head()