Created
June 19, 2014 08:43
-
-
Save falsecz/10e246a03ed25d1a344c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memoize = require 'memoizee' | |
endpoint = (done) -> | |
console.log "remote call" | |
setTimeout () -> | |
console.log "volam done" | |
done "vysledek" | |
, 1000 | |
endpoint (x) -> | |
console.log "1 done", x | |
endpoint (x) -> | |
console.log "2 done", x | |
setTimeout () -> | |
console.log "=========================" | |
endpointSPamatovackem = memoize endpoint, async: yes | |
endpointSPamatovackem (x) -> | |
console.log "1 done", x | |
endpointSPamatovackem (x) -> | |
console.log "2 done", x | |
, 2100 |
Author
falsecz
commented
Jun 19, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment