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

Clarify contract for dealing with synchronous pipelines #121

Closed
alexandru opened this issue Feb 15, 2016 · 1 comment
Closed

Clarify contract for dealing with synchronous pipelines #121

alexandru opened this issue Feb 15, 2016 · 1 comment
Milestone

Comments

@alexandru
Copy link
Member

The contract will change such that:

  • only direct references to Continue and Cancel are considered to be synchronous
  • in operators we'll deal with optimizations on a case by case basis

Move Ack in monix.execution and introduce these macro-enabled extensions for Future[Ack]:

  • def syncOnContinue(callback: => Unit)(implicit s: Scheduler): Self (macro)
  • def syncOnCancelOrFailure(callback: => Unit)(implicit s: Scheduler): Self (macro)
  • def syncMap(f: Ack => Ack)(implicit s: Scheduler): Future[Ack] (macro)
  • def syncFlatMap(f: Ack => Future[Ack])(implicit s: Scheduler): Future[Ack] (macro)
  • def syncTryFlatten(implicit r: UncaughtExceptionReporter): Future[Ack] (macro)

The purpose of these is dealing with synchronous execution. These will replace our internal utilities defined in monix.internal.

@alexandru
Copy link
Member Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant