Hello,
(a/go (slurp ""))
let's say I slurp a big file - will this consume my go threads? How do I write it in a way that will park the go thread?Wrap it in a thread and parking take from it
(a/go (a/<! (a/thread (slurp ""))))
this you mean?Exactly
Don’t think you need the go and the <! Since a/thread returns a channel with the value already
I suppose the assumption was that there is more code inside the go block. I am now indeed just doing a/thread . Guessing there is virtually no difference between that and future .. ?
Future returns a deref-able thing, thread returns channel