Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] Re: (PR#13351) Meta-ticket: AI and threads
Home

[Freeciv-Dev] Re: (PR#13351) Meta-ticket: AI and threads

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13351) Meta-ticket: AI and threads
From: "Jason Dorje Short" <jdorje@xxxxxxxxx>
Date: Thu, 13 Jul 2006 10:21:05 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13351 >

Per I. Mathisen wrote:

> The big problem is that the AI thread and the main thread will create 
> inconsistent states for each other. Before we can threadify the AI we need 
> to make it able to execute discrete operations that depend on no state 
> data that may be invalidated by other game state changes. But if we do 
> this, we do not need threading - we can just call the AI function to 
> execute a few of these discrete operations while waiting for network 
> packets. Or execute a few network packets while running the AI.

Obviously, locking will be needed.  And given the huge amount of global 
data, the locking won't be too easy.

-jason





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