[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]
<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
|
|