Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacing DipatchQueue.main with background queue #21

Open
murad1981 opened this issue Apr 27, 2019 · 4 comments
Open

replacing DipatchQueue.main with background queue #21

murad1981 opened this issue Apr 27, 2019 · 4 comments

Comments

@murad1981
Copy link

murad1981 commented Apr 27, 2019

the following call asset.resourceLoader.setDelegate in each init method, should use background queue DispatchQueue.global(qos: .background) instead of main queue to prevent possible app freezes on the main thread which happened with me.

@murad1981 murad1981 changed the title the player item doesn't cache audio data replacing DipatchQueue.main with background queue Apr 29, 2019
@ppamorim
Copy link

DispatchQueue..global(qos: .background) is too low and weak. Should be at least DispatchQueue.global(qos: .default).

@neekeetab
Copy link
Owner

I agree that the work of ResourceLoaderDelegate should be done on a global queue. At the same time, the delegate calls should be performed on the main queue.

@ppamorim
Copy link

@neekeetab I've changed to DispatchQueue.global(qos: .default) and it's working fine.

@zackperdue
Copy link

@neekeetab I try this and mine still crashes. Any more info on this?

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

No branches or pull requests

4 participants