Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11151)

Issue 98680044: Add BaseEventLoop._closed attribute

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by haypo_gmail
Modified:
9 years, 11 months ago
Reviewers:
yselivanov, GvR
Visibility:
Public.

Description

Add BaseEventLoop._closed attribute

Patch Set 1 #

Total comments: 9

Patch Set 2 : new BaseEventLoop.is_closed() method #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -19 lines) Patch
M asyncio/base_events.py View 1 6 chunks +19 lines, -0 lines 0 comments Download
M asyncio/proactor_events.py View 1 3 chunks +15 lines, -8 lines 0 comments Download
M asyncio/selector_events.py View 1 5 chunks +8 lines, -8 lines 0 comments Download
M tests/test_base_events.py View 1 1 chunk +14 lines, -0 lines 0 comments Download
M tests/test_selector_events.py View 1 3 chunks +14 lines, -3 lines 0 comments Download

Messages

Total messages: 8
GvR
https://codereview.appspot.com/98680044/diff/1/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/98680044/diff/1/asyncio/base_events.py#newcode135 asyncio/base_events.py:135: self._closed, self.get_debug())) I wonder if we should also add ...
9 years, 11 months ago (2014-05-28 23:05:27 UTC) #1
yselivanov
https://codereview.appspot.com/98680044/diff/1/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/98680044/diff/1/asyncio/base_events.py#newcode133 asyncio/base_events.py:133: return ('<%s running=%s closed=%s debug=%s>' Hm, maybe if event ...
9 years, 11 months ago (2014-05-28 23:07:09 UTC) #2
haypo_gmail
https://codereview.appspot.com/98680044/diff/1/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/98680044/diff/1/asyncio/base_events.py#newcode135 asyncio/base_events.py:135: self._closed, self.get_debug())) On 2014/05/28 23:05:26, GvR wrote: > I ...
9 years, 11 months ago (2014-05-28 23:18:45 UTC) #3
GvR
Since event loops don't have any other properties I think get_closed() is the thing to ...
9 years, 11 months ago (2014-05-28 23:45:03 UTC) #4
yselivanov
On 2014/05/28 23:45:03, GvR wrote: > Since event loops don't have any other properties I ...
9 years, 11 months ago (2014-05-28 23:50:18 UTC) #5
GvR
Oh, fine. On Wed, May 28, 2014 at 4:50 PM, <yselivanov@gmail.com> wrote: > On 2014/05/28 ...
9 years, 11 months ago (2014-05-28 23:51:47 UTC) #6
GvR
LGTM. You may shorten the __repr__ if not closed (as Yuri suggested), or you may ...
9 years, 11 months ago (2014-06-03 03:11:34 UTC) #7
haypo_gmail
9 years, 11 months ago (2014-06-03 23:19:33 UTC) #8
On 2014/06/03 03:11:34, GvR wrote:
> LGTM. You may shorten the __repr__ if not closed (as Yuri suggested), or you
may
> leave it as is.

I disagree with Yury's suggestion for __repr__ because it is possible to close
an event loop while it is running (running=True). But it looks like a bug in
asyncio:
https://code.google.com/p/tulip/issues/detail?id=171

I will reconsider Yury's suggestion when this issue will be solved.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b