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 async reqwest to avoid blocking the UI #2

Open
matze opened this issue Jun 24, 2020 · 3 comments
Open

Use async reqwest to avoid blocking the UI #2

matze opened this issue Jun 24, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@matze
Copy link
Owner

matze commented Jun 24, 2020

Should be possible to integrate with the GLib mainloop running the UI.

@matze matze added the enhancement New feature or request label Jun 24, 2020
@matze matze modified the milestones: 0.2, 1.0 Jun 24, 2020
@thomaseizinger
Copy link

Do you have on concrete ideas on how you would want this to work? :)

I've never worked with GLib but my first impression was that we should probably move all the storage handling to a different thread if we want to stay away from Arc<Mutex> and keep the &mut to Storage.
Once it is on a different thread, we could potentially get away with just doing things synchronously and working off a job queue that is coming from a channel that the main thread feeds into.

@matze
Copy link
Owner Author

matze commented Jul 4, 2020

Do you have on concrete ideas on how you would want this to work?

Nope, I've only had a cursory look how GLib integrates with Rust's async (i.e. this release note (see Futures) and this example) but have not further looked into it in particular.

I see where you are coming from but after last night's move of current state handling to the Storage I don't know if a thread/command queue based model would work that well now. But I am open for suggestions.

@matze matze closed this as completed in dbbbfc9 Jul 4, 2020
@matze
Copy link
Owner Author

matze commented Jul 4, 2020

Oops … wrong ticket.

@matze matze reopened this Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants