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

Final changes to make all code follow our async conventions #312

Merged
merged 5 commits into from
Jul 29, 2019

Conversation

albrow
Copy link
Contributor

@albrow albrow commented Jul 27, 2019

Fixes #96.

Depends on #307. After that PR is merged I'll change the base branch for this one to development.

Summary of changes:

  • Make core.App.Start blocking.
  • Remove core.App.Stop.
  • Avoid log.Panic and log.Fatal whenever possible (there are some lingering cases where e.g., we pass a function into another function and don't have a good way to return errors).
  • Remove the blockwatch.Watcher.Errors channel. For non-critical errors, we log them in blockwatch.Watcher directly. For critical errors, we return them in blockwatch.Watcher.Watch. This makes blockwatch more aligned with the rest of our async code.
  • Don't start any goroutines without a way to stop them (usually by waiting for ctx.Done() but sometimes with short timeouts or other signals).

@albrow albrow force-pushed the feature/final-consistent-async-changes branch from 3156d18 to 10f56ed Compare July 27, 2019 00:16
@albrow albrow changed the base branch from feature/orderwatch-consistent-async-api to development July 29, 2019 18:07
@albrow albrow force-pushed the feature/final-consistent-async-changes branch from 10f56ed to 86751be Compare July 29, 2019 18:10
@albrow albrow merged commit c1c1a77 into development Jul 29, 2019
@albrow albrow deleted the feature/final-consistent-async-changes branch July 29, 2019 20:05
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.

Make asynchronous APIs more consistent
2 participants