Sage / streamlinejs

Asynchronous JavaScript for dummies
http://bjouhier.wordpress.com/2011/01/09/asynchronous-javascript-the-tale-of-harry/
MIT License
959 stars 56 forks source link

exclusive funnel should not deadlock if reentered recursively #360

Closed bjouhier closed 7 years ago

bjouhier commented 7 years ago

Exclusive funnel (max == 1) deadlocks if it is reentered recursively. Instead we should detect this special event and either allow reentry or throw an exception, depending on a funnel option.

bjouhier commented 7 years ago

I reverted this feature. It was incorrectly throwing when two futures are waiting on the same funnel. I don't see a reliable way to implement reentrancy detection in funnel.