[Freeciv-Dev] [patch #1846] Threads
Update of patch #1846 (project freeciv): Status: In Progress = Done Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?1846 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1846] Threads
Follow-up Comment #3, patch #1846 (project freeciv): Considering time constraints, I'm probably not going to take advantage of threads in Freeciv code in immediate future. Nevertheless, here is initial fc_thread class implementation. It's just wrapper for phtread. This was used years ago in a proof-of-concept threaded AI patch. I don't consider any other parts of that patch usable any more. Even if I have no immediate plans for taking advantage of this thread class, I would like to commit it to Freeciv tree in early phase of 2.4 cycle. It would already get compilation exposure and we would have time to figure out what kind of alternative underlining implementations to support and what kind of configure checks we have to add based on those encountered compilation problems. (file #11733) ___ Additional Item Attachment: File name: FcThread.diff Size:4 KB ___ Reply to this item at: http://gna.org/patch/?1846 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1846] Threads
Follow-up Comment #4, patch #1846 (project freeciv): - Added basic configure check for pthreads existence. fc_thread class is not compiled at all if pthreads are not available. (file #11734) ___ Additional Item Attachment: File name: FcThread_1846-2.diff Size:5 KB ___ Reply to this item at: http://gna.org/patch/?1846 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1846] Threads
Follow-up Comment #5, patch #1846 (project freeciv): - If compiling pthreads implementation - Link against pthread library - Compile with -pthread flag (file #11736) ___ Additional Item Attachment: File name: FcThread_1846-3.diff Size:5 KB ___ Reply to this item at: http://gna.org/patch/?1846 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1846] Threads
URL: http://gna.org/patch/?1846 Summary: Threads Project: Freeciv Submitted by: cazfi Submitted on: Wednesday 08/11/2010 at 16:19 Category: general Priority: 5 - Normal Status: In Progress Privacy: Public Assigned to: cazfi Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.4.0 ___ Details: 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: http://gna.org/patch/?1846 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1846] Threads
Follow-up Comment #1, patch #1846 (project freeciv): Using threads in the server would make the server a lot more scalable, so this would be a good improvement. I think that having even more granularity in the server could be investigated, looking for more tasks that could be run in separate threads. Would it be possible to have one thread for every player or connection? Further, would it be possible to run pathfinding in a separate thread? Of course, locks would have to be used when accessing shared data, such as the map. I really think that having a multithreaded server would be a good improvement for Freeciv, also for my project on http://www.freeciv.net/ where I think running longturn games with large maps and many players would benefit from a threaded server. ___ Reply to this item at: http://gna.org/patch/?1846 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev