Swift question: there is a library that has some functionality, but it's implemented as an actor. I'm working a a completely synchronous program (a CLI app that builds a static website), but I want to use a function from this actor from normal non-concurrent code.

In the example code for using the library it awaits a function call. Is it possible to call this using some kind of concurrent-in-non-concurrent wrapper?

The library in question is MarkdownSyntax, and I suppose it's implemented as an actor for performance reasons in a UI context (do stuff in the background I presume?).

#swiftlang #askfedi

@torb I’m not sure I understand the question. But a CLI app can use async/await. What’s the real blocker?

@nixzhu Yeah, but the entire rest of my app is synchronous (including some libraries that I'm not sure that play nice with async code).

That said, I'm fairly new to coding in Swift, so there's a good chance I'm not understanding and it's possible in ways that I'm not aware of!