how to punt one func off the main thread in a class derived from a @MainActor class

27 Views Asked by At

how would I do this:

@MainActor class Foo {}
class Bar: Foo {
    func caller()
    {
    // how would I invoke somethingIneedToRunOnThreadOtherThanMain so that it runs on thread other than main?
    }

    func somethingIneedToRunOnThreadOtherThanMain() async throws
    { ...
    }


}
0

There are 0 best solutions below