|
From: | Charles Kerr |
Subject: | Re: [Pan-devel] g_message function calls |
Date: | Wed, 08 Nov 2006 11:34:15 -0600 |
User-agent: | Thunderbird 1.5.0.8 (X11/20061025) |
with some links to mingw-friendly implementations of nonblocking connections, but I'm pretty busy. If someone wants to make a patch, though, I'd be happy to accept it. Charles robert mcdonald wrote:
You're correct. And the windows variant of the code is extremely similar (trivial differences) and worksequally well.
On 11/6/06, Charles Kerr <address@hidden> wrote:The socket creation code is a special case there-- it's the /only/part of Pan that uses threads, and it's a verysmall task. Thepurpose here is to make a connection in anonblocking way so thatPan doesn't freeze while connecting.Humh... As I remember, it is possible to make a socket connection non-blocking without using threads. I have done such thing with select (or poll). The algo: create the socket and connect it (O_NONBLOCK), then register the file descriptor in select (poll) and then, when something occurs, it is probably a connection success (or failure). Look athttp://www.developerweb.net/forum/showthread.php?p=13486Perhaps it could be interesting to rewrite the "connection" part, so pan will be fully thread safe (which is more simpler and safer than multi-thread). I'm quite sure that such asynchronous connection could be made with the GLIB "event loop". What's your opinion? Do you already try such asynchronous connection?
[Prev in Thread] | Current Thread | [Next in Thread] |