[Telepathy] TelepathyQt threading

Gustavo Boiko gustavo.boiko at canonical.com
Tue Oct 13 13:34:33 PDT 2015


Hi

On Tue, Oct 13, 2015 at 5:18 PM, Daniel Pocock <daniel at pocock.pro> wrote:

>
>
>
> If a connection manager uses some library that creates its own threads
> (it is not a Qt based library either), are there any constraints on how
> these threads interact with the TelepathyQt API?
>
> For example, if the connection is completed in another thread, is it
> safe to call setStatus() from that thread?
>

It is probably not safe to call that from a different thread. If
setStatus() was a Qt slot, you could use QMetaObject::invokeMethod() with
Qt::QueuedConnection directly, but that's not the case. So, what you can do
is to define a slot to proxy the request and use
QMetaObject::invokeMethod() to call that slot.


> Or is there some way to propagate information from the threads used by
> the underlying library back to TelepathyQt?
>
> _______________________________________________
> telepathy mailing list
> telepathy at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/telepathy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/telepathy/attachments/20151013/b72b9bcc/attachment.html>


More information about the telepathy mailing list