discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Request for feature in GRC


From: Achilleas Anastasopoulos
Subject: [Discuss-gnuradio] Request for feature in GRC
Date: Sat, 1 Nov 2014 13:49:50 -0400

I recently had a problem with GRC where two threads were accessing
a set_variable callback creating some unwanted behaviour
(actually crashing the xmlrpc server).
I fixed it by editing the python file created by GRC and locking the set_ callback.

I thought that this can be a separate and interesting feature of the "variable" block in GRC, ie, a selector that selects if the user wants it to be "protected".
Then a piece of code like below will be generated:


self.lock = threading.Lock()

    def set_variable(self, value):
        self.lock.acquire()
        self.value = value
        other set_ cllabacks
        self.lock.release()


best,
Achilleas

reply via email to

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