-
Notifications
You must be signed in to change notification settings - Fork 24
Feature/use python future #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
raise exceptions.ExecutionBlocked | ||
|
||
def result(self, timeout=None): | ||
with self._condition: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._condition
is specific to Python concurrent.futures
implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but as we reuse concurrent.futures.Future
, the usage of this conditional lock should be consistent, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that concurrent.futures.Future
was not intended to be a base class as the module lacks an abstract base class. Hence it already comes with some implementation details like the threading.Condition
used to wait until the completion of the task.
I suggest we add this missing abstract base class that comes with the _condition
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we just don't care about the _condition
here in SwfFuture
, they are not useful.
|
Let's add an abstract base class And then inherit from it inside the packages that provides the backend implementations such as:
In local, the multiple inheritance is required to enforce custom feature of |
@ggreg updated like what we've discussed last friday. |
Thanks for the update, I have not reviewed it yet. |
It will allow to continue the work on #8. |
Yay! Rebase et tests passed! |
Great! Kudos @darkjh. |
@ggreg it's the right time to merge this? |
651bf4a
to
9a1e162
Compare
…tor specific future impls in there package
@ggreg it seems now the default branch is |
@ggreg all tests pass under pypy-2.4.0 on my machine. |
Travis uses pypy 2.5.0. I need to make the test fail with pypy locally. |
I found that the 'dummy' future is very difficult to handle in this case. |
For issue #9
It's easier than I thought. Comment please.