gbishop / outfox

Automatically exported from code.google.com/p/outfox
Other
1 stars 0 forks source link

Deadlock caching same sound twice immediatey #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. outfox.audio.play(url); outfox.audio.play(url);
2. First call causes extension to XHR get the sound into the cache.
3. Second call blocks trying to read the cache entry in the extension.
4. When XHR finishes, call to fetch the cache entry blocks on the other
blocking call to the cache.
5. Deadlock.

Switch the initial check of the cache to a non-blocking call. Use the error
code to detect if the cache entry is being created. If so, send a deferred
to the service and wait for notification of success or failure writing the
file to the disk cache. On notification, proceed as if the pending request
had done its own XHR fetch of the file.

Original issue reported on code.google.com by c...@unc.edu on 22 Feb 2009 at 4:36

GoogleCodeExporter commented 9 years ago
Fixed in revision 147.

Original comment by c...@unc.edu on 22 Feb 2009 at 4:45