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

Actors in coswift #103

Open
jeffdgr8 opened this issue May 4, 2020 · 2 comments
Open

Actors in coswift #103

jeffdgr8 opened this issue May 4, 2020 · 2 comments

Comments

@jeffdgr8
Copy link

jeffdgr8 commented May 4, 2020

Is your feature request related to a problem? Please describe.
It's currently not possible to implement coroutine actors using the coswift library in Swift code.

Describe the solution you'd like
It would be helpful for co_actor() and related functions and classes in coobjc to be implemented in coswift for usage in Swift code.

Describe alternatives you've considered
I've tried using the functions from the coobjc Objective-C API and there are a number of issues with getting it to work nicely in Swift. For example, COActorChan can't be iterated in a for-loop. And COActorCompletable is a COPromiserather than the coswift equivalent Promise. Also, importing the <coobjc/coobjc.h> API in the Swift bridging header introduces ambiguous function definitions such as co_delay().

@NianJi
Copy link
Collaborator

NianJi commented May 14, 2020

coobjc is not design for swift.

We will consider it: implement COActor in coswift

@NianJi
Copy link
Collaborator

NianJi commented Mar 22, 2021

Swift 5.5 will support async/await, https://forums.swift.org/t/swift-5-5-release-process/45644, coswift will be deprecated.

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

No branches or pull requests

2 participants