[gnome-games] generic: Yield on GenericGameUriAdapter.game_for_uri()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] generic: Yield on GenericGameUriAdapter.game_for_uri()
- Date: Fri, 5 May 2017 07:10:15 +0000 (UTC)
commit a8cc2abfd2fcb76d46660b3af25bbc94f0c865e6
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.
https://bugzilla.gnome.org/show_bug.cgi?id=781334
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]