Menu
  • HOME
  • TAGS

Use of ThreadFactory in java

java,multithreading,threadgroup

I have not been able to understand the term hardwiring of calls to new Thread Basically you don't have to tightly couple caller with thread object instead you can deledate to ThreadFactory. One advantage of this i can think is lets say you want to mock the thread call...

How does enumerate() method of ThreadGroup works?

java,enumerate,threadgroup

In Java everything is passed by value, but you're confusing a reference to the object instance with the object instance itself. In your case, the reference of array list[] is passed by value, this means that no matter if you modify the reference (for example doing list[] = new list[5],...

Sonar ThreadGroup error on IllegalArgumentException

sonarqube,illegalargumentexception,threadgroup

This is a known issue relating to underlying analyzer PMD : http://jira.codehaus.org/browse/SONARPMD-5 As per this bug report, this bug should be fix if you use latest version of sonar-pmd plugin (2.2 as of writing) which relies on PMD 5.1.1...

Confusion regarding ThreadGroup#activeCount()

java,multithreading,threadgroup

You can easily try this: Thread t1 = new Thread(new Runnable() { @Override public void run() { Scanner sc = new Scanner(System.in); sc.nextInt(); } }); Thread t2 = new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(10000); } catch (InterruptedException e) { e.printStackTrace(); } } }); t1.start();...

How to decide the ideal hold time in Ultimate Thread Group in Jmeter

jmeter,performance-testing,jmeter-plugins,threadgroup

Ideal time depends on you use case but a total load time should last enough to be able to have a reliable analysis of your load test, at least 1 hour.

Max no of controllers in a thread group in jmeter

jmeter,threadgroup

No limit , error is somewhere else. Note that 68 include controllers looks a bit too much, is there a reason for this ?...