Closed whatyouhide closed 2 years ago
@josevalim you know, after thinking a bit more about this, I think you're right. The best approach for now seems to just document this with an example. I don't know that this is such a common case and the solution in the example works well enough (we're using it in production at Community, for example 😄). Reworked the PR to only be about docs, thoughts?
This is the way to go but I think more work is necessary. For example, what happens if you receive a
handle_demand
or ahandle_call
after this? So we would need to block and do nothing until all events are dispatched, or give up on this idea (and let users implement it pretty much as you did it here).