Affinity in Java thread

0 votes

How do we lock down the individual threads contained within the Java processes that are specific to the CPU core. Any suggestion will be helpful.

Oct 31, 2018 in Java by 93.lynn
• 1,600 points
1,854 views

1 answer to this question.

0 votes

Well, as far as I know, I don't think Java allows that.

But you can use an underhand method where you need to make use of JNI in order to invoke the native codes that will execute the program.

answered Oct 31, 2018 by code.reaper12
• 3,500 points

Related Questions In Java

0 votes
2 answers
0 votes
1 answer

How can you catch an exception thrown by another thread in Java?

This can be done using Thread.UncaughtExceptionHandler. Here’s a simple ...READ MORE

answered Dec 3, 2018 in Java by Frankie
• 9,830 points
24,973 views
0 votes
0 answers

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/HasAuthentication

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/HasAuthentication at java.base/java.lang.ClassLoader.defineClass1(Native ...READ MORE

Oct 22, 2021 in Java by anonymous
• 120 points
1,853 views
0 votes
1 answer

Exception in thread main java.util.InputMismatchException error

Problem int name; //Name should be of type ...READ MORE

answered Feb 18, 2022 in Java by Rahul
• 9,680 points
2,066 views
0 votes
1 answer

difference between wait() and sleep() in java

We can find a big difference between ...READ MORE

answered Apr 26, 2018 in Java by developer_1
• 3,350 points
1,222 views
0 votes
1 answer

How to kill a thread in Java?

You can use a shared variable as ...READ MORE

answered Jun 6, 2018 in Java by Akrati
• 3,190 points
1,195 views
0 votes
1 answer

How to stop the Thread in Java?

Use a flag, which will indicate the ...READ MORE

answered Jun 11, 2018 in Java by Parth
• 4,640 points
1,540 views
0 votes
1 answer

Gracefully stopping a java thread

The preferable way will be to use a ...READ MORE

answered Aug 21, 2018 in Java by anto.trigg4
• 3,440 points
1,334 views
0 votes
1 answer

Purpose of “String args[]” in the “psvm” of Java

Let me give you the complete explanation ...READ MORE

answered May 7, 2018 in Java by code.reaper12
• 3,500 points
4,710 views
0 votes
1 answer

Need for finalize() in Java

finalize() is a method called by the ...READ MORE

answered May 9, 2018 in Java by code.reaper12
• 3,500 points
691 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP