Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: focus lost irrevocably on game startup (PR#506)
Home

[Freeciv-Dev] Re: focus lost irrevocably on game startup (PR#506)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vincent Ugenti <skorpion@xxxxxxxxxxxxx>
Cc: thue@xxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: focus lost irrevocably on game startup (PR#506)
From: Thue <thue@xxxxxxx>
Date: Sat, 19 Aug 2000 15:48:02 +0200
Reply-to: thue@xxxxxxx

> > This bug report should go to gtk, no?
> >
> > -Thue
> 
> No, for 2 reasons. First, I have not looked at the code to confirm that this
is
> the source of the problem (and I have no intentions of doing so!). Secondly,
even
> if the bug were as I suspect it, that would not imply any problem with GTK,
as a
> GUI tool kit it probably isn't and never was, nor will ever be thread safe.
> Meaning, all acess to GUI objects needs to be made by the same thread. I
would
> attribute this bug to a race condition between two threads while accessing
the
> GUI.
> 
> Once again, I have not looked at the code but simply based on the behavior of
the
> GUI under these circumstances reminds me of things I often see when
programming
> under Java and violating multithreading rules. I don't know for 100% sure if
> GTK is not thread-safe, either - it's just an assumption I am making based on
the
> symptoms I observed and without checking the code (although I enjoy freeciv
alot
> I barely have enough time to play it, let alone assist in the development
> process!).
> 
> If, however, thread safety turns out to be a key issue there is a simple way
to
> fix it. You could have a dedicated GUI thread that accepts GUI requests from
other
> threads and queues them in a manner such that only one thread is accessing
the
> GUI at a time. That's only one possible solution, I am sure there are
others.
> 
> Vincent

Umm, looks like I was too fast. The client is not multithreaded, you know?

-Thue



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