summaryrefslogtreecommitdiff
path: root/Makefile-libostree.am
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-08-12 17:03:52 -0400
committerColin Walters <walters@verbum.org>2015-08-13 22:02:00 -0400
commit9f3d5869935c7f75fa06b0cfbabf9a49cd90f0f2 (patch)
tree75b7f4050eb561a96103b345ca3a934e069e4fcb /Makefile-libostree.am
parent5c20ea920e0986686b3bd680a43a1ab1cdde37ea (diff)
downloadostree-9f3d5869935c7f75fa06b0cfbabf9a49cd90f0f2.tar.gz
pull: Stop using GMainLoop
First of all, what we were doing with having GMainLoop in the internal APIs is wrong. Synchronous APIs should always create their own main context and not iterate the caller's. Doing the latter creates potential for evil reentrancy issues. Sync API should block, async API is for not blocking. Now that's out of the way, fix the pull code to do the clean ``` while (termination_condition (state)) g_main_context_iteration (mainctx, TRUE); ``` model for looping. This is a lot easier to understand and ultimately more reliable than having other code call `g_main_loop_quit()`, as the loop condition is in exactly one place. We can also remove the idle source which only fired once. Note we have to add a hack here to discard the synchronous session and create a new one which we only use async. https://bugzilla.gnome.org/show_bug.cgi?id=753336
Diffstat (limited to 'Makefile-libostree.am')
0 files changed, 0 insertions, 0 deletions