Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds parallel[F] version of async[F] #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Baccata
Copy link
Collaborator

@Baccata Baccata commented Jun 17, 2021

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 Baccata requested a review from djspiewak June 17, 2021 12:24
@djspiewak djspiewak mentioned this pull request Jun 17, 2021
@djspiewak
Copy link
Member

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!

@Baccata
Copy link
Collaborator Author

Baccata commented Jun 28, 2021

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.

@djspiewak
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants