refactor executeThreads
This commit is contained in:
parent
9ec6e18552
commit
00ecdb4a02
@ -66,9 +66,7 @@ public class SharedObjectWithLockManualTest {
|
|||||||
|
|
||||||
private void executeThreads(SharedObjectWithLock object, int threadCount, ExecutorService service) {
|
private void executeThreads(SharedObjectWithLock object, int threadCount, ExecutorService service) {
|
||||||
for (int i = 0; i < threadCount; i++) {
|
for (int i = 0; i < threadCount; i++) {
|
||||||
service.execute(() -> {
|
service.execute(object::perform);
|
||||||
object.perform();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user