[Python-bugs-list] [ python-Bugs-595217 ] asynchat problems multi-threaded
SourceForge.net
noreply@sourceforge.net
Mon, 10 Mar 2003 07:39:25 -0800
Bugs item #595217, was opened at 2002-08-14 15:34
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595217&group_id=5470
Category: Python Library
>Group: Feature Request
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Dieter Maurer (dmaurer)
Assigned to: A.M. Kuchling (akuchling)
Summary: asynchat problems multi-threaded
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2003-03-10 10:39
Message:
Logged In: YES
user_id=11375
Added to PEP 42 and closed; this would be a fair bit of work,
and it's not clear many people use asynchat.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=595217&group_id=5470