Is it possible to ensure that a subscriber is the last to be executed in the observer queue? A delay(0)
is no option for me since I need the code to be executed in line and not asynchrounus.
let observable = new Subject<void>();
//delay(0) no option!
observable.pipe().subscribe(() => console.log("I want to be last!"));
observable.subscribe(() => console.log("I want to be first!"));
observable.next();
I've created an example here: https://stackblitz.com/edit/rxjs-demo-xuf2ru
I want the first subscriber, to be executed last. The current console output is:
I want to be last!
I want to be first!