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) {
|
||||
for (int i = 0; i < threadCount; i++) {
|
||||
service.execute(() -> {
|
||||
object.perform();
|
||||
});
|
||||
service.execute(object::perform);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue