Author: toad
Date: 2008-04-11 20:28:00 +0000 (Fri, 11 Apr 2008)
New Revision: 19206

Modified:
   trunk/freenet/src/freenet/client/FECCodec.java
Log:
Doh... if it's NOT windows and either it is OS/X or native threads isn't 
available, then limit to 1 thread.

Modified: trunk/freenet/src/freenet/client/FECCodec.java
===================================================================
--- trunk/freenet/src/freenet/client/FECCodec.java      2008-04-11 20:21:40 UTC 
(rev 19205)
+++ trunk/freenet/src/freenet/client/FECCodec.java      2008-04-11 20:28:00 UTC 
(rev 19206)
@@ -361,7 +361,7 @@
                long now = System.currentTimeMillis();
                if(now - lastPolledMaxRunningFECThreads < 5*60*1000) return 
maxRunningFECThreads;
                String osName = System.getProperty("os.name");
-               if(osName.indexOf("Windows") != -1 && 
(osName.toLowerCase().indexOf("mac os x") > 0) || 
(!NativeThread.usingNativeCode())) {
+               if(osName.indexOf("Windows") == -1 && 
(osName.toLowerCase().indexOf("mac os x") > 0) || 
(!NativeThread.usingNativeCode())) {
                        // OS/X niceness is really weak, so we don't want any 
more background CPU load than necessary
                        // Also, on non-Windows, we need the native threads 
library to be working.
                        maxRunningFECThreads = 1;


Reply via email to