Marco Trevisan (Treviño) wrote: > Gustavo Sverzut Barbieri wrote: >> On Mon, Mar 30, 2009 at 10:13 PM, "Marco Trevisan (Treviño)" >> <m...@3v1n0.net> wrote: >>> Marco Trevisan (Treviño) wrote: >>>> Unfortunately testing it with the msn-purple plugin (I've tried also >>>> with Facebook, but I've some issues with the certs) the test client >>>> attached segfaults. >>> I've made one more test using Google Talk (so a jabber server), and now >>> I've a different behavior: >> Are you sure any of these functions that call >> ecore_{idler,fd_handler,timer}_add are NOT executed from threads? I'm >> asking this because glib allows you to call these primitives from >> threads if you did g_threads_init() > > Well, I've not sure about this (I've not studied so much libpurple, I've > done this only in few hours), but it doesn't seem the case. > Using looking at the value returned by pthread_self() in various parts > of the program (especially putting it in the callback functions), it has > returns always the same value.
Ah, to confirm this there's the WhatIsLibpurple libpurple wiki page [1] that simply states: > Is it threaded? > > libpurple is not threadsafe. It should be accessed by an implementing UI only > one thread ever (that is, do not attempt to use synchronization or locks to > access it from multiple threads).. Plugins can use multiple threads, but they > must always call libpurple functions and callbacks on the thread on which > they were initialized (typically the main thread of the program). > libpurple's run loop access occurs through eventloop.c; the UI must implement > the UI Ops defined there and register them in order to watch sockets for new > data and call timeout functions after a specified delay. For example, Pidgin > uses the glib run loop, and Adium uses the Cocoa event run loop. So, the thread thing, doesn't seem to affect us. >> but Ecore does not, in such case >> you need to pipe primitives to main thread and fd_handler them, or >> ecore_pipe for ready to use. > > Mhmh... Any example to show? :P So forget about this... ;) [1] http://developer.pidgin.im/wiki/WhatIsLibpurple -- Treviño's World - Life and Linux http://www.3v1n0.net/ ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel