mail[Wesnoth-commits] r24514 - in /trunk: changelog src/network_worker.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by paniemin on March 11, 2008 - 09:05:
Author: suokko
Date: Tue Mar 11 09:05:46 2008
New Revision: 24514

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24514&view=rev
Log:
 Fixed network_worker to span at least one thread (bug #11238)

Modified:
    trunk/changelog
    trunk/src/network_worker.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=24514&r1=24513&r2=24514&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Tue Mar 11 09:05:46 2008
@@ -23,6 +23,7 @@
  * miscellaneous and bug fixes:
    * wmlxgettext now print some context information about the strings
      extracted (patch #993)
+   * Fixed network_worker to span at least one thread (bug #11238)
    * more comprehensive terrain type naming to avoid confusing displays such
      as 'Road (Grassland)' or 'Impassable mountain (Cavewall)'
      This also applies to the WML keys used in the stats :

Modified: trunk/src/network_worker.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/network_worker.cpp?rev=24514&r1=24513&r2=24514&view=diff
==============================================================================
--- trunk/src/network_worker.cpp (original)
+++ trunk/src/network_worker.cpp Tue Mar 11 09:05:46 2008
@@ -552,9 +552,14 @@
                min_threads = p_min_threads;
                max_threads = p_max_threads;
 
+               if (p_min_threads == 0)
+               {
+                       p_min_threads = 1;
+               }
+
                for(int shard = 0; shard != NUM_SHARDS; ++shard) {
                        const threading::lock lock(*shard_mutexes[shard]);
-                       for(size_t n = 0; n != min_threads; ++n) {
+                       for(size_t n = 0; n != p_min_threads; ++n) {
                                threading::thread * tmp = new 
threading::thread(process_queue,(void*)intptr_t(shard));
                                threads[shard][tmp->get_id()] = tmp;
                        }




Related Messages


Powered by MHonArc, Updated Tue Mar 11 09:40:42 2008