Skip to content

Return to main thread #26

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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