clj-commons / manifold

A compatibility layer for event-driven abstractions
1.02k stars 108 forks source link

Deferred timeout! might not be working #16

Closed drpjm closed 9 years ago

drpjm commented 9 years ago

I was running through the deferred documentation using the 0.1.0-beta8 version of manifold. I ran the following code: @(d/timeout! (future (Thread/sleep 2000) :foo) 100) and there is no TimeoutException. It runs for 2 seconds and spits out :foo. When I followed the example and placed :bar as the timeout-value, it still returns :foo. Could there be an issue with the manifold/time/in function?

drpjm commented 9 years ago

On closer inspection of the documentation and discussion with @pgotfel, I see I should use the deferred future function. However, it would be good to change the documentation to keep the namespace qualifier in the example: @(d/timeout! (d/future (Thread/sleep 1000) :foo) 100 :bar)