[Spice-devel] [PATCH spice-server] red-channel: Store client callback data in ClientCbs
Christophe Fergeau
cfergeau at redhat.com
Wed Jun 27 07:35:14 UTC 2018
On Wed, Jun 27, 2018 at 03:13:00AM -0400, Frediano Ziglio wrote:
> > ClientCbs is definitely not something which needs to be registered
> > per-channel instance, it's more of a class thing, and the dispatcher is
> > more something which could be thread local. I would not stick everything
> > together like this before cleaning up more of that mess...
> >
>
> Disagreed, is not a class thing, it's should be a responsibility of however
> assign the thread to the specific instance.
> Is not much thread local, more "instance local" I would say.
Maybe we actually agree ;) The channel specific code which eventually
gets called to do the actual disconnection/migration/... is
class-specific, you don't want to do disconnection one way when it's
running in a thread, and a totally different way when it runs in the
main thread.
Then, and I think you have this in mind when you say that you disagree,
whether we can directly call these functions, or need to use some kind
of dispatcher to call back into the main thread is something which
could be instance local, though if we have a thread-local dispatcher for
all channels, that probably makes things a little bit simpler.
Christophe
-------------- 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/20180627/55ec2b1a/attachment.sig>
More information about the Spice-devel
mailing list