Update of /cvsroot/freenet/freenet/src/freenet/thread
In directory sc8-pr-cvs1:/tmp/cvs-serv19780/src/freenet/thread

Modified Files:
        FastThreadFactory.java QThreadFactory.java 
Log Message:
6283:
Set new threads to NORMAL priority level. Hopefully this won't fsck up people's 
efforts to nice freenet... it seems to be necessary under some platforms because the 
ticker is at max priority and they inherit by default.
Don't close the selector if it's already closed in ASL.reset(), catch any throwables 
caught by closing and try to reopen anyway. Documet mySelect. Catch 
ClosedSelectorException and try to handle it in mySelect.
Fix NPE in ConnectionHandler.
Logging.


Index: FastThreadFactory.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/thread/FastThreadFactory.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -w -r1.21 -r1.22
--- FastThreadFactory.java      3 Jul 2003 03:33:43 -0000       1.21
+++ FastThreadFactory.java      28 Oct 2003 03:02:50 -0000      1.22
@@ -56,7 +56,9 @@
             thread.start();
            return thread;
         } catch (EmptyStackException e) {
-            return new FThread(threadID(), job);
+            FThread ft = new FThread(threadID(), job);
+           ft.setPriority(Thread.NORM_PRIORITY);
+           return ft;
         }
     }
 

Index: QThreadFactory.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/thread/QThreadFactory.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -w -r1.41 -r1.42
--- QThreadFactory.java 14 Oct 2003 16:38:34 -0000      1.41
+++ QThreadFactory.java 28 Oct 2003 03:02:50 -0000      1.42
@@ -173,6 +173,7 @@
         } else {
                        thread = headLock.pop(); // thread cannot be null.
                }
+               thread.setPriority(Thread.NORM_PRIORITY);
                // synchronize so that getThread can't sneak in between
                // test for job == null and this.wait() in thread.run().
                synchronized (thread) {

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to