Submitted by: cazfi
Submitted on: Wednesday 08/11/2010 at 16:19
Priority: 5 - Normal
Status: In Progress
Assigned to: cazfi
Discussion Lock: Any
Planned Release: 2.4.0
Running AI in separate thread has been discussed several times over the
years. Now that number of maximum players has been increased, wait for AI
between turns has increased notably. I'd like to implement AI in separate
thread for freeciv 2.4.
Some other minor tasks (updating metaserver information) could be run in
separate threads as well.
This ticket is about implementing, or not implementing, thread class under
utility directory. Obviously gtk-client and freeciv-modpack can use gthreads
as they already depend on gtk, but question is what server side dependencies
we are ready to add. Should we use gthreads also there (making server to
depend on glib), should we use some other higher level thread implementation
(adding some other dependencies to server), or should we create our own
wrapper for pthread and other platform specific thread implementations?
I have extracted and updated such a wrapper from ancient threaded AI patch I
had. Implementation exist for pthread support only, but adding native windows
threads etc should be easy. Actually, what platforms freeciv runs on that
don't have pthreads?
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list