[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Network connection from a different thread



On Sat, 5 Aug 2006 01:48:21 +0200 Andrew Sevcsik <sevcsik@citromail.hu> babbled:

> Any ideas?

efl libs are not threadsafe - there are no plans to make them so as it's a
tonne of hassle and locking. generally i would advise to not use threads except
for specific special purposes where you are just unable to schedule your own
code. efl (eg ecore_con/ecore_ip) provide completely transparent async socket
communications api's for you so you don't need threads.

anyway - if you access ecore, evas, edje, eet, etc. etc. calls from more than 1
thread - you are asking for trouble.

> On Thu, 3 Aug 2006 00:30:49 +0200
> Andrew Sevcsik <sevcsik@citromail.hu> wrote:
> 
> > Hi list.
> > 
> > I tried to connect to a jabber server from a different thread, while i
> > was in the ecore_evas main loop. I tried it in Ruby (XMPP4R and
> > jabber4r libraries), and in C (Loudmouth library). Loudmouth has an
> > implented connect function, wich is done in a different thread, and
> > than calls a callback func. In ruby, I started the threads with
> > Thread.new{}.
> > 
> > The problem is that I can't connect from a different thread. The
> > thread stops at connecting (resolving the server's domain). But
> > everything works fine in the other thread, until I try to connect to
> > the network. Once I quit ecore main loop, the thread continues
> > without errors (connection is successful).
> > 
> > How can I connect, while I'm in the main loop (in a different thread,
> > so the GUI don't freeze)?
> > 
> > Thanks for the help.
> > 	Sevcsik
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)