Re: Why only 2,000 simultaneous threads ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Bailo (jabailo_at_earthlink.net)
Date: 11/27/04


Date: Sat, 27 Nov 2004 01:09:53 GMT

Jeff_Relf wrote:

> instead of: while ( ! Go ) Sleep( 0 );

Yes, it's about 250ms in java for 2000 threads.

Here's the part that doesn't seem write for me, just in terms of your
technique.

When running in the debugger with breakpoints, what I see is that the
threads, naturally stop themselves once the global var is set to true.

This seems to happen even before the .join on the members of the thread
array.

Doesn't it make more sense to have the threads "do something" and then join
them in order to stop them in the main thread?

-- 
http://www.texeme.com


Relevant Pages

  • Re: Reading a C struct in java
    ... What kind of Java object do you want to ... Also tell us what you have now (an array of bytes, ... OIS from an arbitrary sequence of bytes. ... contents than just the object members. ...
    (comp.lang.java.programmer)
  • Re: Doing One Operation on All Array Members (Without Iteration)
    ... Is there any way to do the same operation on all members of that array ... Java doesn't really do this (although something similar can be hacked with objects, as it seems to have been in the Jakarta Commons link posted by Manish). ...
    (comp.lang.java.programmer)
  • Re: Newbie static class member question [C++]
    ... > equivalent of a Java interface would be an abstract class with only pure ... Still not perfect, I know, since private and public members are ... class declaration, but define them outside of it. ... > virtual void foo(); ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Java Generic programming using subclassing
    ... Java nowhere guarantees that the elements of an array ... Now chances are that any Java ... > reference will be visible through the other. ... > eligible for garbage collection, and will in fact be collected before ...
    (comp.lang.java.programmer)
  • Re: java based supercomputer
    ... checking the correlation beteween an array of data and another array ... java psuedo remote threads will take a considerrably less time. ... Does your algorithm lend itself well to paralellization? ... the only bottleneck i can see is checking the correlation value ...
    (comp.lang.java.programmer)