cyclejs-community / cycle-serverless

A driver for using cyclejs and xstream in serverless FaaS environments (Azure Functions)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify exit symantics

SteveALee opened this issue · comments

The source listener exits on receiving an item by setting a timeout of 1 ms to ensure any other synchronous activity like calling other listeners on the same stream can occur before the exit happens.

This might not be necessary if context.done happens on the next tick. It might not even be require anyway. Needs investigation.

Sometimes it may be a requirement to exit immediately. A flag would allow that.