coolaj86/futures — Issue #21: setTimeout and fulfill
Author: paulslater19
Created: 2011-11-18 11:59:14+00:00
State: open

I was trying to use setTimeout() as a "timeout" error for my async function. However, if the function fulfill()-ed the future first, an error is generated when the setTimeout() fires.

I got around this by using deliver() and when() instead of fulfill(),

Was I using setTimeout() with the wrong expectations, or should it check if the future has been fulilled before firing it's event?

Cheers
Paul