Steven Schveighoffer <> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |
         Resolution|                            |INVALID

--- Comment #1 from Steven Schveighoffer <> 2010-11-03 
07:55:06 PDT ---
The original code looks correct to me.  Rewritten in pseudocode:

   nonDaemon = null;
   assign nonDaemon to first non-daemon thread in the list of threads;
   if(nonDaemon not found)
     // this means there are no non-daemon threads left

The reason it is done this way instead of the way you suggest is because the
foreach is synchronized on a lock (to prevent threads coming/going while
iterating).  So you don't want to call join while inside the foreach loop.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to