Yeah, I’m using Ubuntu 10.04. Maybe I should make it more clear about
the
structure of my code. Actually I’d like the spectrum sensing program to
run
for a certain time and then quit. So I add a time control in my code.
Below
is a more detailed structure:
Class Wimax_Receiver(gr.top_block):
…
def add_fft_cal(self, fft_cal_block):
# Get new block
self.FFT_calculate = fft_cal_block
# Add FFT to output of USRP
self.connect(self.u, self.FFT_calculate)
class ThreadClass(threading.Thread):
…
class tune(gr.feval_dd):
…
class parse_msg(object):
…
class FFT_Calculation(gr.top_block):
…
self.wr = Wimax_Receiver()
self.wr.add_fft_cal(self.s2v)
self.connect(self.s2v, self.fft_cal, self.c2mag, self.log,
self.stats)
self.connect(self.wr)
def set_center_freq(self):
do something for time control and stop flowgraph by tb.stop()
def main_loop(tb):
print out FFT amplitude and frequency information
if name == ‘main’:
# Initiate a thread to run the program
tr = ThreadClass()
tr.start()
# Create an object of FFT block
tb = FFT_Calculation()
try:
Run the main block
tb.run()
main_loop(tb)
except KeyboardInterrupt:
pass
From the error message, I guess it’s because when I shut down the
flowgraph
in the set_center_freq function the usrp_uhd block is still streaming
but
the thread scheduler has already terminate thread allocation for it. So
in
order to avoid this issue, you recommend to update Ubuntu to 11 or 12? I
really appreciate it if you could help me fix this problem.
Josh B.-3 wrote:
of
error
shown below:
Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page
–
View this message in context:
http://old.nabble.com/Problem-with-thread-scheduler-tp34213396p34246603.html
Sent from the GnuRadio mailing list archive at Nabble.com.