[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Radio web API
From: |
Marcus Müller |
Subject: |
Re: GNU Radio web API |
Date: |
Thu, 25 Jun 2020 19:47:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
Hi Kevin,
you're kind of right:
On 25/06/2020 05.34, Kevin Reid wrote:
There is unfortunately
no standard way to tell a block to free the resources it is using, other
than ensuring it is "deleted" by dropping all references to it.
Well, technically, when a flow graph is finished running, the stop()
methods are called for that very reason. But then you can't reconnect.
We never thought about the proper semantics for that function. IMHO, we
would have needed a "prepare for reconfiguration" state. And, we would
have needed an explicitly defined state machine to begin with to not end
up in a million different states...
Therefore, you need to ensure that your Python code does not have any
variables or attributes referring to the old top block or the individual
blocks, before you construct the new blocks.
Even then, Python garbage collection is non-deterministic, I think .
That said, you may want to try the alternative of keeping the UHD,
socket, etc. blocks around and reusing them, and only changing what
they're connected to. (That's what ShinySDR currently does, though with
different blocks.) Basically, use disconnect() as well as connect() to
change your flow graph's connectivity while it's stopped so that it
suits the new purpose. You might encounter some misbehavior here too,
though; this is not a frequently used and well-tested part of GNU
Radio's capabilities.
Absolutely true, sadly.
Fun fact, there's now multiple research institutions spending
braingrease on this, hopefully we'll find a solution to this whole
problem soon.
Best regards,
Marcus
smime.p7s
Description: S/MIME Cryptographic Signature