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

Use DispatchQueue scheduler #8

Merged
merged 1 commit into from
Oct 27, 2020
Merged

Conversation

arunrdd
Copy link
Contributor

@arunrdd arunrdd commented Oct 24, 2020

The RunLoop scheduler is busy when there is active user interaction(like table view scrolling). All the downstream data updates will be delayed due to this. Using RunLoop works but it would delay network responses, until RunLoop.main is free to process. DispatchQueue scheduler will work just like any other DispatchQueue.main.async blocks.

I haven't simulated this scenario, but it is elaborately discusses in Swift forums. In most cases difference might not be visible. Although, in this framework's context it might be more sensible to use DispatchQueue scheduler.

References:

@arunrdd
Copy link
Contributor Author

arunrdd commented Oct 24, 2020

@s4cha There is I think a mismatch between the Swift tools version this package is using and the one that Github Actions is using to build.

@s4cha
Copy link
Member

s4cha commented Oct 27, 2020

@ArunRD Thanks a ton for taking the time to document this. According to the swift discussion you provided, this makes perfect sense so let's go for it. I'll try to fix the GitHub job separately, which is more experimental at the moment.

@s4cha s4cha merged commit b18883b into freshOS:master Oct 27, 2020
@s4cha
Copy link
Member

s4cha commented Oct 27, 2020

This should be available in 0.3.1 -> https://github.com/freshOS/Networking/releases/tag/0.3.1 👏

@arunrdd arunrdd deleted the change-scheduler branch October 27, 2020 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants