octave-maintainers
[Top][All Lists]
Advanced

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

Re: Race condition seems to be fixed


From: Michael Goffioul
Subject: Re: Race condition seems to be fixed
Date: Tue, 22 May 2012 13:23:26 +0100

On Tue, May 22, 2012 at 12:57 PM, Jacob Dawid <address@hidden> wrote:
Sorry, you're right, they're blocking, I did a mistake myself. But still crashing :(

2012/5/22 Jacob Dawid <address@hidden>
That's not true. I am executing everything in the same thread, ie. I only update the model. the model-view interaction is threadsafe again. Using the hook I have added - which is blocking - proves that. Also, with debug messages I can show that the readline hook is non-blocking.
 
AFAIK readline even hooks are blocking, as long as the hook is executing. What is probably happening is that you're executing some code in another thread than the main thread (where readline is executing), then it is possible readline triggers a new run of the hook while your code is still executing in the other thread. It's up to you to make your code safe.

Michael.


I am not highly familiar with the model/view framework in Qt, especially in mutli-thread, but by googling a bit, it doesn't look like the Model/View interaction is thread-safe.

Michael.

[1] http://stackoverflow.com/questions/9485339/design-pattern-qt-model-view-and-multiple-threads
[2] http://lists.trolltech.com/qt-interest/2005-12/thread00823-0.html


reply via email to

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