[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Re: Please help me out with udp_sink
From: |
Johnathan Corgan |
Subject: |
Re: [Discuss-gnuradio] Re: Please help me out with udp_sink |
Date: |
Wed, 22 Jul 2009 10:21:34 -0700 |
On Wed, Jul 22, 2009 at 07:45, Yc Park<address@hidden> wrote:
> ece$ python ./from_udp.py
> gr_block_executor: source <gr_block udp_source (3)> returned 0 from
> work. We're marking it DONE.
This is essentially a bug in the design of gr.udp_source() that sort
of worked okay back in the single-threaded scheduler days, but not now
with the multi-threaded scheduler. Basically, returning 0 samples
from a source block work function will cause the scheduler to
immediately call it again, resulting in 100% utilization of a
processor core until the source block can produce data. The
thread-per-block scheduler enforces this now by terminating the block.
The fix is fairly easy (the original problem returning 0 was supposed
to solve can be fixed in another way), but not sure when it can be
done.
A work around is to open the network socket in Python, then pass the
file descriptor to gr.file_descriptor_source(item_size, fd).
Johnathan