cats-effect-cps icon indicating copy to clipboard operation
cats-effect-cps copied to clipboard

Adds parallel[F] version of async[F]

Open Baccata opened this issue 4 years ago • 3 comments

Adds parallel version of the async method, which translates the block into F.delay+ parMapN calls.

The macro attempts to protect against ill-use by preventing any definition in the parallel region to be used in its contained await calls, as it would prevent the rewrite to parMapN from compiling.

Baccata avatar Jun 17 '21 12:06 Baccata

This looks really nice! I think we're going to need a Scala 3 version though before it can be merged, but otherwise I'm in favor!

djspiewak avatar Jun 28 '21 16:06 djspiewak

This looks really nice! I think we're going to need a Scala 3 version though before it can be merged, but otherwise I'm in favor!

I've started doing it and encountered the Scala3-macro brickwall that I'm slowly digging through. I was hoping it'd take me a lot less time than it has. I think I'm gonna have to ask for help.

Baccata avatar Jun 28 '21 16:06 Baccata

I've started doing it and encountered the Scala3-macro brickwall that I'm slowly digging through. I was hoping it'd take me a lot less time than it has. I think I'm gonna have to ask for help.

Yeah this is a particularly rough one, since we have to implement the whole transformation ourselves.

djspiewak avatar Jun 28 '21 16:06 djspiewak