diff options
author | Colin Walters <walters@verbum.org> | 2015-08-12 17:03:52 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-08-13 22:02:00 -0400 |
commit | 9f3d5869935c7f75fa06b0cfbabf9a49cd90f0f2 (patch) | |
tree | 75b7f4050eb561a96103b345ca3a934e069e4fcb /Makefile-libostree.am | |
parent | 5c20ea920e0986686b3bd680a43a1ab1cdde37ea (diff) | |
download | ostree-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