T
T
Tarasov Konstantin2014-07-01 18:41:21
Java
Tarasov Konstantin, 2014-07-01 18:41:21

How is the next thread to be executed in java selected?

I will give an example - there are one hundred threads. All of them work with one object. When a thread obtains execution rights, it completely locks the object and releases it only after it has done all the necessary work. The question is - can I be sure what we say in 5 minutes. program work, did all threads capture the object approximately the same number of times? Those. can it happen that some thread will be allowed to work with an object 100 times, and another only 20?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question