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

Comments

Projects
None yet
1 participant
@alexandru
Copy link
Member

alexandru commented Feb 15, 2016

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 alexandru added this to the 2.0 milestone Mar 2, 2016

@alexandru

This comment has been minimized.

Copy link
Member Author

alexandru commented Mar 2, 2016

Done.

@alexandru alexandru closed this Mar 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.