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

Use Async name for async APIs #9

Closed
dansiegel opened this issue May 7, 2019 · 3 comments
Closed

Use Async name for async APIs #9

dansiegel opened this issue May 7, 2019 · 3 comments

Comments

@dansiegel
Copy link
Member

Description

Several API's within Shiny such as IJobManager.Schedule or IJobManager.Run look like they are synchronous when they actually operate asynchronously. This can lead to confusion where you might think you can initialize your jobs like:

manager.Schedule(someJob);
manager.Run("someJob");

However with them being async methods it is possible that the job may not be scheduled when Run is called. Adopting a Async suffix for async API's would be helpful to developers as it would be self evident that it's async.

await manager.ScheduleAsync(someJob);
await manager.Run("someJob");

Version of Library

  • 1.0.0.2-beta
@close-issue-app
Copy link

This issue is closed because it does not meet our issue template. Please read it.

@aritchie
Copy link
Member

aritchie commented May 8, 2019

Thanks for the suggestion Dan. I'm actually anti-postfix async on methods. The type defines the outcome in my opinion. I also mix between between observables & tasks throughout the project. I don't want to say "ThisObservable" and "ThisAsync" everywhere.

@lock
Copy link

lock bot commented Aug 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants