Skip to content

Instantly share code, notes, and snippets.

@traviskaufman
Created October 28, 2019 21:40
Show Gist options
  • Save traviskaufman/05cb6a4134861cc7ef3a0e2c32d7dc81 to your computer and use it in GitHub Desktop.
Save traviskaufman/05cb6a4134861cc7ef3a0e2c32d7dc81 to your computer and use it in GitHub Desktop.
Demystifying RxJS, Part III: Concrete Schedulers
const syncScheduler: Scheduler = {
schedule(work) {
work();
}
};
const asyncScheduler: Scheduler = {
schedule(work) {
setTimeout(work, 0);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment