Pushing events within a thread: Thread safety

Dear developers,

First of all, I would like to thank you for making the Tango system available! This is a really great control system and the backbone for our experiment!

Recently, we wrote a device server, which uses a thread for some signal processing (it is a callback function called by another framework). Now, we intend to push an event whenever the result is available for the user. Our thread calls the push_event method. Is there a good way of synchronizing the push_event call with the Tango threads? Or is push_event thread safe anyways? How could we synchronize our thread to the relevant thread of the Tango device server (for example, is there a mutex we can lock within our thread)?

We had some crashes, which we relate to calling push_event within our thread without synchronization.

Thank you for your help!
With best regards
Yves Acremann


Yves Acremann
ETH Zurich
Solid State Physics
Otto-Stern-Weg 1, HPF C5
8093 Zurich

Hi,

I also experienced crashes when pushing change events from my own threads. They
were occurring both with Tango 8.1.2 and Tango 9.1.0. I think I found where the
problem may be, and submitted bug report #761.

However, according to svn, the part of the code that seems to be causing the
problem was added to the Tango sources this September, so it could not be the
reason of your problems. But at least in my case, the similar problems I was
experiencing with Tango 8.1.2 were probably fixed in Tango 9.1.0.

Regards,
Josef Cibulka
Hello,

I confirm two things:

  1. The patch sent by Josef for bug number 761 looks fine for me and after a testing phase (Tank's Josef for both patch and test system) will be incorporated within the trunk
  2. The bug was effectively introduced by code added in September 2015 to force ZMQ to do some memory garbage collection required in some re-connection cases. This is Tango 9 only.

Regards

Emmanuel
 
Register or login to create to post a reply.