Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7229) Re: Re: Freeciv commit: ali: Add macro is_
Home

[Freeciv-Dev] Re: (PR#7229) Re: Re: Freeciv commit: ali: Add macro is_

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: a-l@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7229) Re: Re: Freeciv commit: ali: Add macro is_city_hilited().
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 11 Jan 2004 06:34:40 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7229 >

On Sat, Jan 10, 2004 at 05:52:09PM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7229 >
> 
> >
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7229 >
> >
> > On Sat, Jan 10, 2004 at 12:52:26PM -0800, Jason Short wrote:
> >> > Do you expect a piece of silicon to generate an interrupt precisely
> >> > at L1 which may change punit_focus via a GTK timer?
> >>
> >> This is wrong on many levels.
> >>
> >> 2.  Freeciv clients are single-threaded, so there will never be an
> >> interrupt to change the value at L1.
> >
> > Don't be sure in this regard. If the (gtk) timer is implemented with
> > alarm(2) or similar and not select(2) it isn't single-threaded. Also
> > the SDL client uses multiple threads. However I'm not sure here about
> > the impact.
> 
> In that case large portions of the client need to be rewritten.  In this
> case, neither form will work without locking the focus unit first.

While I haven't checked the source I have confidence that the GTK
people chose the select and the alarm route.

IIRC correctly the interaction in the SDL client between the event and
the main thread are very small (adding events to a queue which IIRC
was locked itself correctly).

So there are no real problems with MT (yet) but saying "Freeciv
clients are single-threaded" is a bit too easy.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The two rules for success in life are:
  1) Never tell them everything you know."




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