[Spice-devel] [PATCH spice-server v2 1/2] docs: Add some notes on event scheduling and threading
Victor Toso
victortoso at redhat.com
Wed Apr 3 09:02:28 UTC 2019
Hi,
On Fri, Mar 29, 2019 at 11:15:28AM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> docs/spice_threading_model.txt | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/docs/spice_threading_model.txt b/docs/spice_threading_model.txt
> index 9351141c8..1ed82d4b4 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.
> +
For both patches
Acked-by: Victor Toso <victortoso at redhat.com>
I would suggest changing the suffix to .md so it can be
recognized properly in gitlab
https://gitlab.freedesktop.org/spice/spice/blob/master/docs/spice_threading_model.txt
> Reference counting and ownership
> --------------------------------
> -> pointer
> --
> 2.20.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190403/520fab37/attachment.sig>
More information about the Spice-devel
mailing list