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

Async Shim instead of "syncable" protocols #76

Open
avaidyam opened this issue Jul 15, 2017 · 0 comments
Open

Async Shim instead of "syncable" protocols #76

avaidyam opened this issue Jul 15, 2017 · 0 comments
Assignees
Milestone

Comments

@avaidyam
Copy link
Owner

PSE (rather, ParrotServiceExtension) should only support pure async methods. Parrot (client-side), there should exist a set of async --> sync shims. For example:

public protocol AsyncProtocol {
    func getProperty(_ reply: (Any) -> ())
    func setProperty(_ value: Any)
    
    func doThing(_ input: Any, reply: (Any, Error) -> ())
}
public struct SyncShim {
    var property { get set }
    func doThing(_ input: Any) throws -> Any
}
@avaidyam avaidyam modified the milestone: 1.0 Jul 21, 2017
@avaidyam avaidyam self-assigned this Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant