I'm seeing a weird error when trying to use isolated and consuming together.
This compiles fine:
protocol UsableActor: Actor {
borrowing func useIt()
}
func keepBusy<T: UsableActor>(_ actor: consuming isolated T) {
actor.useIt()
}
But marking function as async produces an error:
protocol UsableActor: Actor {
borrowing func useIt()
}
func keepBusy<T: UsableActor>(_ actor: consuming isolated T) async {
// | `- error: 'actor' used after consume
// `- note: consumed here
actor.useIt()
// `- note: used here
}
Looks like hopping to the actor consumes it. I'm not sure if it makes sense. Is this a bug?