New submission from Justin Mayfield:
Patch available on my github fork..
https://github.com/mayfield/cpython/commit/8d50cc61f42fa280d380e9c10c420c949a619bef
--
components: asyncio
messages: 280280
nosy: Justin Mayfield, gvanrossum, yselivanov
priority: normal
severity: normal
status
Justin Mayfield added the comment:
I agree with Guido. I spent a couple hours trying to debug some of my own code
that turned out to be this issue. My use case is single threaded too.
Perhaps I'm daft but I don't understand why the child watcher is part of the
event loop policy. At first
Justin Mayfield added the comment:
Alexander,
That sounds unrelated. I'd treat it as a new issue until you have concrete
evidence to the contrary.
Also on face value it sounds like it might just be your operating systems open
file limit. On OSX I think the default open file limit
Justin Mayfield added the comment:
I should have commented more on the run_once removal. The depiction given in
its docstring seemed inconsistent with the new way stop works and I found no
callers, so it seemed like it was best left out to avoid confusion. No worries
though, I didn't get
Justin Mayfield added the comment:
Ha, email race.
Regarding rev 2, the updated docstring and scheduled stop looks good along with
alleviating the confusion I mentioned.
I'm not sure about your warning comment; Perhaps that's a patch I didn't lay
eyes on.
Cheers
Justin Mayfield added the comment:
I see. Seems like good discussion over there. I joined up.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Justin Mayfield added the comment:
Attached patch submission for stop flag proposal. I assume you didn't mean a
github PR since the dev docs seem to indicate that is for readonly usage.
This passes all the tests on my osx box but it should obviously be run by a lot
more folks
Justin Mayfield added the comment:
You bet.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25593>
___
___
Python-bugs-list
Justin Mayfield added the comment:
+1
Let me know what I can do to help.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Justin Mayfield added the comment:
Interesting.
I was going to do an analysis what using _ready.appendleft() for adding
selector events would do for that scenario. The idea being to consistently
juxtapose exiting callbacks, selector events and new callbacks. However I
think this just moves
Justin Mayfield added the comment:
Yes, that's what I was suggesting.
Looking at tornado they do the stop between callbacks/matured-scheduled and
events. That approach seems somewhat arbitrary to me at first glance but
tornado is very mature and they usually have good reasons for what
Justin Mayfield added the comment:
I don't believe this is a case of nonidempotent callbacks, unless you are
referring to Future.set_result(), which by design can't be called twice. The
callbacks are given an inconsistent opportunity to modify the poll set because
of indeterminacy
Justin Mayfield added the comment:
Guido,
Shouldn't this not be the case for level triggered polling? From looking at
selectors it looks like these are always level triggered which means they
should only event once.
--
___
Python tracker <
Justin Mayfield added the comment:
Attached server side of repro.
--
Added file: http://bugs.python.org/file41017/Issue25593_repro_server.py
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Justin Mayfield added the comment:
Just reproduced on Linux, Fedora Core 23.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Justin Mayfield added the comment:
Attaching simplified test setup. It does take some doing to repro so the
local async server is required to make it happen (for me). When I tried just
pointing to python.org it would not repro in 100 iterations, but using a local
dummy server repros 100
Justin Mayfield added the comment:
Nevermind, in the case of writeablity it won't matter either way.
--
So in looking at tornado's ioloop they run the ready callbacks before calling
poll(). So the callbacks can modify the poll set.
--
___
Python
Justin Mayfield added the comment:
This code repros without aiohttp when pitted against the previously attached
web server (again on OSX 10.11, mid-2012 MBPr).
Admittedly this may seem very arbitrary but I have better reasons in my
production code for stopping an IOLoop and starting it again
Justin Mayfield added the comment:
I'm attaching a patch that runs `_ready` callbacks at the start of `_run_once`.
The style and implications are ranging so I leave it to you at this point.
--
keywords: +patch
Added file:
http://bugs.python.org/file41019
Justin Mayfield added the comment:
I believe I'm seeing this bug in a non-threaded and non-forked env.
System:
OSX 10.11.1 (15B42)
Python 3.5.0 (from brew install)
I'm using aiohttp to create several dozens of HTTP connections to the same
server (an async tornado web server). Nothing
Instead of rewriting your code you might consider wrapping it with the
C-API. I prefer this approach (over ctypes) for anything low level.
http://docs.python.org/c-api/
On 09/06/2010 10:06 PM, Kwan Lai Cheng wrote:
Hi,
I'm trying to rewrite a c program in python encountered several
21 matches
Mail list logo