[Spice-commits] 2 commits - docs/spice_threading_model.txt
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed May 29 09:24:20 UTC 2019
docs/spice_threading_model.txt | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
New commits:
commit 5ee2af0fe5d45062a13638491319a73146fd1041
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Mar 29 11:14:36 2019 +0000
docs: Remove obsolete paragraph
ClientCbs were removed, all is automated in RedChannel.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/docs/spice_threading_model.txt b/docs/spice_threading_model.txt
index 1ed82d4b..62be39bb 100644
--- a/docs/spice_threading_model.txt
+++ b/docs/spice_threading_model.txt
@@ -31,14 +31,6 @@ The main dispatcher is used to send requests to the main thread.
The Qxl uses a dispatcher to send requests to the RedWorker which will forward
to DisplayChannel/CursorChannel.
-RedClient may call some RedChannelClient functions using some callbacks
-registered inside ClientCbs. Usually these callbacks are functions that do the
-job directly if the RedChannel is running in the main thread or they use a
-dispatcher to do the job in the right thread. Currently there are 3 callbacks:
-connect, disconnect and migrate. Connect and migrate are asynchronous (the job
-is done while the current thread is doing something else) while disconnect is
-synchronous (the main thread will wait for termination).
-
One aspect to take into consideration is the event scheduling. SPICE uses some
`SpiceCoreInterface` to handle events. As the events will be handled from a
thread based on the core interface you have to use the correct core. Each
commit c52b88c8951cb9dbf1dcf949b0b82a1bf5b1b656
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Mon Mar 11 14:03:07 2019 +0000
docs: Add some notes on event scheduling and threading
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/docs/spice_threading_model.txt b/docs/spice_threading_model.txt
index 9351141c..1ed82d4b 100644
--- a/docs/spice_threading_model.txt
+++ b/docs/spice_threading_model.txt
@@ -39,6 +39,20 @@ connect, disconnect and migrate. Connect and migrate are asynchronous (the job
is done while the current thread is doing something else) while disconnect is
synchronous (the main thread will wait for termination).
+One aspect to take into consideration is the event scheduling. SPICE uses some
+`SpiceCoreInterface` to handle events. As the events will be handled from a
+thread based on the core interface you have to use the correct core. Each
+channel has an associated core interface which can be retrieved using
+`red_channel_get_core_interface`. There's also a main core interface you can get
+using `reds_get_core_interface`. `reds_core_timer_*` and `reds_core_watch_*`
+functions use the main core interface.
+Even though multiple channel types run in the main thread and so could use
+directly the main code interface, for coherence, rule simplicity and to allows
+the code to be moved in a separate thread easily if needed, it's advisable to
+use the channel core interface (that will be the main core interface in this
+case).
+Currently character devices and not channel code runs in the main thread.
+
Reference counting and ownership
--------------------------------
-> pointer
More information about the Spice-commits
mailing list