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

POC +str Add StreamCollector api for unsafe transformation. #628

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Sep 4, 2023

Motivation:
Make it simpler when integrating with other effect system.

When reading : https://alexn.org/blog/2023/04/17/integrating-akka-with-cats-effect-3/ ; I think there should be a simpler api to integrate other effect system ,which does not need to transform back to Future.

The unsafeTransform can be implemented in similar way.

refs: typelevel/cats-effect#3807

Related work: akka/akka#28674 from @jrudolph

And the unsafeTransform can be implemented in similar way

Notes:

  1. This is a quick POC and the api need more polish, as the unsafe statements, it's unsafe.
  2. This is not a F[_] typeclass implementation.

@alexandru ping

@He-Pin He-Pin marked this pull request as draft September 4, 2023 17:47
@mdedetrich
Copy link
Contributor

Also pinging @jrudolph because he did prior work on this

@He-Pin He-Pin force-pushed the flowEmiter branch 4 times, most recently from 5970749 to d245d4d Compare September 5, 2023 16:17
@He-Pin He-Pin changed the title POC +str Add Emitter api for unsafe transformation. POC +str Add StreamCollector api for unsafe transformation. Sep 10, 2023
case Some(elem) => handleSync(elem)
case None => future.onComplete(handle(_))(pekko.dispatch.ExecutionContexts.parasitic)
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for demo

@He-Pin
Copy link
Member Author

He-Pin commented Dec 24, 2023

Now JDK22 ships a Gather https://openjdk.org/jeps/461

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.

None yet

2 participants