After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772668 - ephy_bookmarks_manager_save_to_file_async should actually be async
ephy_bookmarks_manager_save_to_file_async should actually be async
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Bookmarks
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-09 23:11 UTC by Michael Catanzaro
Modified: 2018-08-03 20:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Catanzaro 2016-10-09 23:11:57 UTC
I was making a couple minor improvements to migrate_bookmarks, when I noticed a curious problem:

How is it that ephy_bookmarks_manager_save_to_file_async always finishes?

Then I revised the question:

How does it even do anything? There is no main loop!

Then I discovered that ephy_bookmarks_manager_save_to_file_async is a nice asynchronous-looking wrapper for a synchronous function call. Looks like I reviewed the code too fast. :) Since gvdb doesn't have an async API, we probably need to use g_task_run_in_thread(). (And then we'll need to update the profile migrator to use the sync version.)
Comment 1 Carlos Garcia Campos 2016-11-21 13:08:38 UTC
I think we should follow the opposite approach regarding the name, ephy_bookmarks_manager_save_to_file should be async, and if we need to a dd a sync version we add ephy_bookmarks_manager_save_to_file_sync. Also the _to_file makes me think it receives a file, but it always saves to the same file, so I would remove the to_file and leave just ephy_bookmarks_manager_save/load(). I wonder why those need to public, though, ideally the manager would load the bookmarks at startup, and watch them to update the file when they change. It could also do a sync save on dispose, so in the case of the migrator it will be done when the created manager is destroyed.
Comment 2 GNOME Infrastructure Team 2018-08-03 20:53:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/336.