Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: worklists (PR#722)
Home

[Freeciv-Dev] Re: worklists (PR#722)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: worklists (PR#722)
From: Kero van Gelder <kero@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Mar 2001 22:25:39 +0100
Reply-to: kero@xxxxxx

> > NB: you need a way to lock the list, so it can't be edited twice at
> > the same time; I do not know the multi-threading behaviour of gtk,
> > but I know freeciv has no mechanisms implemented by itself. And no, a
> > simple boolean as field in the worklist will not work, of
> > course.
> 
> Why not?
> 
> You seem to be all concerned about thread-safety,

Yes. Problems with threads are difficult to track and fix. Better to
do it right.

> but the simple 
> situation is that freeciv in general is not thread safe, so any 
> GUI which uses threads will have problems.  The current GUIs instead
> use event loops: events can happen in various orders, so you have to
> worry about widget states and callbacks and network events etc, but 
> each event will be processed one-at-a-time, so you don't have to 
> worry about atomicity etc while processing for each event.

As said, I know nothing about the implementation of gtk (or other
widget-sets). If that means there is one single thread for the client
as well; I'll run a short test [...] OK, single sleep hangs the
complete gui-gtk, including the link to the server.

Saves a lot of trouble, if you can ``guarantee'' those event-loops for
all gui's. That's a choice I can live with, even :-) Is there a
document where this info is in? (I took a short look under Development
on the freeciv web-page, but its not there).

So the good news is: solution 1) from my previous mail is feasible
again.

Bye,
Kero.

+--- Kero --------------------------------- kero@xxxxxx ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ------------------ http://huizen.dds.nl/~kero ---+



[Prev in Thread] Current Thread [Next in Thread]