Skip to content

Return to main thread #26

@Mijail

Description

@Mijail

Hello!

Maybe this is a stupid question but I haven't been able to solve it as of yet.

I have something like

async {
    let report = try await(self.reportStore.getReport())
    //update UI
}

As I am inside the async I am not in the main thread and get whacky behaviour on the UI. But if I call the await in the main thread I get a deadlock on the semaphore wait. what should I do if I want to get back to the main thread with my result?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions