Message11972
asynchat.async_chat.push has two problems when
used in an application where the pusher and the
main loop are run by different threads.
1. A "push" does not wake up the main loop. This may
result in long delays (the loop, by default, uses a timeout
of 30 s). The work around is an explicit wakeup on the
loop. I do not have a solution for Windows (more
generally an OS where select does not work for pipes).
When select does work for pipes, a simple "wakeup"
can be implemented by writing to a pipe the main loop
is waiting for.
2. The "self.initiate_send" can lead to two identical
sends (which should be only one!) under the condition
above. Workaround is to remove the call.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:04:54 | admin | link | issue595217 messages |
2007-08-23 14:04:54 | admin | create | |
|