discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] PDU_to_tagged_stream consumes 100% CPU even thoug


From: Martin Braun
Subject: Re: [Discuss-gnuradio] PDU_to_tagged_stream consumes 100% CPU even though it is throttled!
Date: Thu, 15 Jan 2015 14:58:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Some background: It was made a TSB block because TSB source blocks
weren't possible until recently, and that's an example use-case. Doesn't
solve the spinning issue.

On 01/15/2015 02:26 PM, Sylvain Munaut wrote:
> On Thu, Jan 15, 2015 at 2:01 PM, Marcus Müller <address@hidden> wrote:
>> Stupid question:
>> at least in the old version of the code, the current message was popped
>> from the queue using delete_head_nowait().
>> Why don't we just delete_head_blocking() and -- block?
> 
> I think this would prevent the flow graph from stopping because it
> would block there indefinitely.
> For that to work, the condition variables of each message port would
> have to be poked by the runtime on shutdown.
> 
> That's why I proposed a version of delete_head_blocking with a timeout
> so we can handover control from time to time.

We've always considered blocking in blocks as harmful, but maybe we need
to think about this a bit more. What we'd definitely need is a way to
interrupt the blocking.

However, what would really solve the issue is if we could define
requirements for msg->stream blocks, similar to 'ninput items required'.

M




reply via email to

[Prev in Thread] Current Thread [Next in Thread]