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

Fix and clarify async-ready, async-get and async-wait (#71). #72

Merged
merged 3 commits into from Feb 19, 2017

Conversation

thierryvolpiatto
Copy link
Collaborator

  • async.el (async-ready): Ensure proc buffer is alive
    and return t if buffer is not alive. Fix docstring.
    (async--wait): Renamed from async-wait.
    (async-get): Ensure proc buffer is alive. Fix docstring.
    (async-start): Docstring only.

* async.el (async-ready): Ensure proc buffer is alive
and return t if buffer is not alive. Fix docstring.
(async--wait): Renamed from async-wait.
(async-get): Ensure proc buffer is alive. Fix docstring.
(async-start): Docstring only.
@thierryvolpiatto
Copy link
Collaborator Author

@jwiegley Please verify I am not wrong in the return value of async-ready and also about making async-wait private.

Thanks.

@jwiegley
Copy link
Owner

async-wait is intended to be a user-facing function that returns when async-get would not block. Why did you want to make it private?

@thierryvolpiatto
Copy link
Collaborator Author

thierryvolpiatto commented Feb 18, 2017 via email

@jwiegley
Copy link
Owner

The example is simply this: If you call async-get, it will block until the future provides a value, and then return that value. If you call async-wait, it will also block until the future provides a value, but it does not return that value -- it leaves it unclaimed in the future. It provides a way to say, "I want to wait until the future is ready", without doing anything with that value.

* async.el (async-wait): Do it.
(async-get):             Do it.
(async-start):           Do it.
@thierryvolpiatto
Copy link
Collaborator Author

thierryvolpiatto commented Feb 19, 2017 via email

@jwiegley
Copy link
Owner

Sure, that sounds good to me.

@jwiegley jwiegley merged commit 666066d into master Feb 19, 2017
@thierryvolpiatto
Copy link
Collaborator Author

thierryvolpiatto commented Feb 19, 2017 via email

@thierryvolpiatto thierryvolpiatto deleted the Fix_async_ready branch February 19, 2017 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants