I have this setup:
protocol Foo {
func foo() async
}
extension Foo {
func foo() async {
print("default implementation")
}
}
final actor Bar: Foo {
func run() async {
print("this function is isolated on actor Bar")
await self.foo()
}
}
- I have a function
foo
in an extension of a protocolFoo
and it’s async. - I have an actor Bar that implements Foo.
- And I have an isolated function
Bar.run
which callsfoo
, which will be resolved to an implementation from the static extension
Question: will the foo
be run on the actor Bar
? Or the actor will be released because it’s an async call outside the scope of actor?