Closed michaelpj closed 4 months ago
You can use Effectful.Ki.atomically
to get STM values, thus I don't think we need to deal with await
, or do we?
:facepalm:
So you can! It just didn't occur to me that STM might be also provided by StructuredConcurrency
. Never mind!
I guess it's a bit unclear where to slice these things, it's also a little odd to have STM when you just ask for StructuredConcurrency
...
I raised https://github.com/TristanCacqueray/ki-effectful/issues/9 about the STM question, which I do think is interesting.
At the moment you can't do everything you want to do with Ki using just
StructuredConcurrency :> es
, becauseawait
andawaitAll
are inSTM
, which requiresConcurrent :> es
. That seems like a shame!