async-interop / event-loop

An event loop interface for interoperability in PHP.
MIT License
170 stars 9 forks source link

Throw an exception on Driver::stop() without loop running #66

Closed bwoebi closed 8 years ago

bwoebi commented 8 years ago

Shall we throw an exception here? Or rather not?

Having it unspecified is probably not the best idea.

I prefer throwing here.

kelunik commented 8 years ago

I prefer not. There may be multiple promises, each stopping the loop on resolution. They may succeed in the same tick.

bwoebi commented 8 years ago

Hmm, good point…

Did not think about the fact that stop() only takes effect on the end of a tick… Yeah … then it should be probably documented explicitly that it does not throw (on the Driver).

bwoebi commented 8 years ago

Oh, why needs pull request … It's already mentioned… closing then…