On Fri, Feb 20, 2009 at 11:43 AM, Maxim Khitrov <mkhit...@gmail.com> wrote: > > Yes, I may have a case where one thread is still sending data, while > another tries to close the connection, or two threads trying to close > the connection at the same time. In both cases, I need some parts of > the code to be atomic to prevent errors.
That does not sound like the right approach, then. Matlab engine is not thread safe in that sense: http://www.mathworks.fr/support/solutions/data/1-YR98I.html?product=ML&solution=1-YR98I cheers, David -- http://mail.python.org/mailman/listinfo/python-list