On Mon, Sep 03, 2001 at 07:43:30PM +0100, Ed Lea wrote:
> > The tricky part with any sort of socket communication will be trying to
> > not block further, 'cause it all runs as one thread. (GNOME doesn't
> > really have this problem because each applet is a separate process; if
> > one blocks, the rest of GNOME still works.)
> Sorry, when you say "blocks"?
Er... ok, so you have a network request like connect() or
gethostbyname(), which takes time.
The way they work normally is to sit in the function until it finishes.
Unfortunately, because further is all one process, that means all of
further sits there, unresponsive, while that function waits.
There are a few ways of working around it:
- hope that they're fast enough (could work, but all of the animated
stuff will freeze while you do it)
- use nonblocking functions; basically, when you say connect() it
starts connecting, but connect() returns immediately... then you can
later learn when it's connected. This'd require some changes in the
further API (which I've intended to do for a while, as other parts
need this functionality), and it'll also still block on
gethostbyname() (there's no nonblocking host name lookups).
- or, run the network stuff in a different process/thread. This is the
proper way to do it, but it's pretty difficult to write properly.
If you're really keen on making it work, I'd suggest going for the first
option, making it work, and then extending to the third option.
> And how's the configuration stuff going?
Mostly doing LiveJournal work, lately... the mail thing was just bugging
me. I should also fix the crashing bug (related to moving the mouse
over something that's fading out) but... I'm lazy.
-- Evan Martin - email@example.com http://www.speakeasy.net/~martine
_______________________________________________ Further-devel mailing list Furtherfirstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/further-devel
This archive was generated by hypermail 2.1.2 : Sun Nov 11 2001 - 14:16:15 PST