[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Iruka-devel] Threading bug in irukaev.py
From: |
Petr Klyushkin |
Subject: |
[Iruka-devel] Threading bug in irukaev.py |
Date: |
16 Aug 2002 15:42:11 +0400 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (bok choi) |
Hello!
I've discovered a huge threading bug. It was lurking in irukaev.py.
Here is an explanation:
Say, imcom-thread receives and handles some event A. Then it calls
appropriate callback, which posts a message about event A to
GUI-thread message-queue (via wxPostEvent) and then continues
execution of imcom-thread. It is possible that before GUI-thread
handles event A, imcom-thread will already have messages B, C, D
(which have arrived after A,) etc handled. Of course, when GUI-thread
will start handler for event A, state of imcom object will not reflect
event A, but will reflect last event handled by imcom-thread.
Fortunately, this problem is solved very easily. It is enough to
block execution of imcom-thread after a message to GUI-thread has been
posted while it is not handled by GUI-thread.
I've already commited a new version of irukaev.py to CVS. Please,
update your local copies.
--
C'ya, Peter.
address@hidden://petrk.pochtamt.ru]=--
--=[ICQ 89449080]=--=[Jabber address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Iruka-devel] Threading bug in irukaev.py,
Petr Klyushkin <=