Skip to content

The whole device hangs because "Lock Device" -> Solution: process in thread / queue #8

@xerenade

Description

@xerenade

When I try to flash several times, the whole device hangs because "Lock Device" do not happen in the thread / queue.
The solution to wrap "Lock Device" with thread / queue.
That's what Swift would look like (Sorry for missing new lines) :

DispatchQueue.global(qos: .userInteractive).async { ... try device.lockForConfiguration() ... device.torchMode = .on ... device.unlockForConfiguration() ... }

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