Actors in coswift
- Dominant language
- Objective-C
- Stars
- 4k
- Forks
- 519
- PR merge metrics
- No merged PRs in 30d
Description
**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 `COPromise`rather than the coswift equivalent `Promise`. Also, importing the `` API in the Swift bridging header introduces ambiguous function definitions such as `co_delay()`.
Contributor guide
Research direction
Start by comparing the coswift API with the coobjc implementations of co_actor() and its related functions and classes. Check how COActorChan, COActorCompletable, Promise, and the co_delay() naming conflict are exposed, then define completion as equivalent actor APIs that work naturally from Swift without the reported bridging issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, swift
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100