[Freeciv-Dev] Re: worklists (PR#722)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Kero van Gelder <kero@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 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, 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.
-- David
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
|
|