Fork me on GitHub
#mount
<
2018-06-25
>
tolitius13:06:34

not following ) but if it keeps state and can't be localized (i.e. (let [foo (promise p)] do with foo...)) it could be a "state". are you using this promise as you would use a "core.async" channel?

richiardiandrea16:06:29

@tolitius I am using it as part of a general flow, which, among other things, does some external call and returns a promise (or a channel actually)

richiardiandrea16:06:02

so at the moment I have a protocol of async functions

richiardiandrea16:06:25

and I am testing them by swapping in my own implementation during testing - say one that times out

richiardiandrea16:06:51

it works well but the record implementing the protocol feels unnecessary

tolitius17:06:59

yea, I would agree, channel as a "state" works better here. "record implementing the protocol" is a slippery slope 🙂