Skip to content

Commit

Permalink
Add active property to CoroutineInProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
jtackaberry committed May 31, 2012
1 parent b05db84 commit 4b5e16c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/coroutine.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,15 @@ def __repr__(self):
return s[:-1] + ', coroutine=%s at %s:%s>' % self._coroutine_info


@property
def active(self):
"""
True if the coroutine is still waiting to be processed, or False if it's
finished.
"""
return True if self._coroutine else False


@property
def interval(self):
"""
Expand Down

0 comments on commit 4b5e16c

Please sign in to comment.