[gnome-games/wip/aplazas/run-uri: 7/21] generic: Yield on GenericGameUriAdapter.game_for_uri()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/aplazas/run-uri: 7/21] generic: Yield on GenericGameUriAdapter.game_for_uri()
- Date: Thu, 13 Apr 2017 14:22:10 +0000 (UTC)
commit 1358d186345470037f9319299b0af61c503ce373
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Apr 13 13:46:41 2017 +0200
generic: Yield on GenericGameUriAdapter.game_for_uri()
Yields before making the game from the URI. This is a safe default as
the callback can't do it and the method is async and hence is expected
to yield at some point.
src/generic/generic-game-uri-adapter.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/generic/generic-game-uri-adapter.vala b/src/generic/generic-game-uri-adapter.vala
index aebb09b..c55501c 100644
--- a/src/generic/generic-game-uri-adapter.vala
+++ b/src/generic/generic-game-uri-adapter.vala
@@ -10,6 +10,9 @@ public class Games.GenericGameUriAdapter : GameUriAdapter, Object {
}
public async Game game_for_uri (string uri) throws Error {
+ Idle.add (this.game_for_uri.callback);
+ yield;
+
return callback (uri);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]