Skip to content
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

Allowed a custom Event type in Pub / Sub futures. #4643

Merged
merged 2 commits into from
Dec 21, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Dec 20, 2017

No description provided.

@dhermes dhermes added the api: pubsub Issues related to the Pub/Sub API. label Dec 20, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 20, 2017
"""

# This could be a sentinel object or None, but the sentinel object's ID
# can change if the process is forked, and None has the possibility of
# actually being a result.
_SENTINEL = uuid.uuid4()

def __init__(self):
def __init__(self, event_factory=threading.Event):

This comment was marked as spam.

"""
def __init__(self, policy):
def __init__(self, policy, *args, **kwargs):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -263,7 +263,7 @@ def open(self, callback):
# Create the Future that this method will return.
# This future is the main thread's interface to handle exceptions,
# block on the subscription, etc.
self._future = Future(policy=self)
self._future = Future(policy=self, event_factory=threading.Event)

This comment was marked as spam.

@dhermes dhermes force-pushed the pubsub-custom-event branch from 50d3abc to 1020c5e Compare December 21, 2017 17:54
"""

# This could be a sentinel object or None, but the sentinel object's ID
# can change if the process is forked, and None has the possibility of
# actually being a result.
_SENTINEL = uuid.uuid4()

def __init__(self):
def __init__(self, completed=None):

This comment was marked as spam.

This comment was marked as spam.

@dhermes dhermes merged commit 76a0f5a into googleapis:master Dec 21, 2017
@dhermes dhermes deleted the pubsub-custom-event branch December 21, 2017 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants