...

/

The Observer Pattern: Synchronous and Asynchronous Events

The Observer Pattern: Synchronous and Asynchronous Events

Learn about synchronous and asynchronous events in the Observer pattern.

We'll cover the following...

Synchronous and asynchronous events

Similar to callbacks, events can also be emitted synchronously or asynchronously with respect to the moment the tasks that produce them are triggered. It’s crucial that we never mix the two approaches in the same EventEmitter, but even more importantly, we should never emit the same ...