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

NIOThrowingAsyncSequenceProducer.AsyncIterator should support isolated next call #3114

Open
fabianfett opened this issue Feb 11, 2025 · 0 comments
Labels
area/performance Improvements to performance.

Comments

@fabianfett
Copy link
Member

To make iteration of AsyncSequences inside actors more performant the function

func next(isolation actor: isolated (any Actor)?) async throws(any Error) -> Element

was added as an advanced implementation hook. NIOThrowingAsyncSequenceProducer.AsyncIterator would ideally implement it.

Implementing this should be fairly easy as isolation: isolated (any Actor)? = #isolation needs to be added to all internal next calls until the internal lock is used. This only works with a Swift 6 compiler though.

@fabianfett fabianfett added the area/performance Improvements to performance. label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance Improvements to performance.
Projects
None yet
Development

No branches or pull requests

1 participant