Fwd: Multi-threaded protocol plugin
eion at robbmob.com
Tue Jun 9 08:28:42 EDT 2015
Libpurple itself isn't thread safe. That said, I've had great success with
calling back to the main thread using purple_timeout_add() and a timeout of
0, in the threaded protocols I've worked with in the past.
Curious to know what the protocol is you're working on and where we might
be able to see your source :)
On 9/06/2015 23:49, "Alexander Solovets" <asolovets at gmail.com> wrote:
> I am writing purple plugin for a custom, non-TCP protocol. >From what I
> learn from the source code it seems that all the plugins rely on
> purple_proxy_connect call which binds incoming messages to callback
> functions, so the plugin code doesn't have to worry about blocking the main
> thread. In my case I have a multi-threaded C++ library which exposes
> asynchronous calls for the protocol API, i.e. there is some class, which
> instance is running in a separate thread, with send/receive methods that do
> not block. Does libpurple have a helper code for such case? I'm not sure
> what I'm looking for exactly. Probably it can be a function to schedule a
> call in the main application thread, or a way to proxify the incoming
> traffic to libpurple.
> Thanks in advance!
> Sincerely, Alexander
> Devel mailing list
> Devel at pidgin.im
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel