File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/by/andd3dfx/multithreading/stack
test/java/by/andd3dfx/multithreading/stack Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 7
7
/**
8
8
* Implement custom stack with multithreading support without using blocking operations
9
9
*/
10
- public class CustomStack <T > {
10
+ public class CustomConcurrentStack <T > {
11
11
12
12
private Deque <T > deque = new ArrayDeque <>();
13
13
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock ();
Original file line number Diff line number Diff line change 8
8
import static org .hamcrest .CoreMatchers .is ;
9
9
import static org .hamcrest .MatcherAssert .assertThat ;
10
10
11
- public class CustomStackTest {
11
+ public class CustomConcurrentStackTest {
12
12
13
- private CustomStack <Integer > stack ;
13
+ private CustomConcurrentStack <Integer > stack ;
14
14
15
15
@ Before
16
16
public void setUp () {
17
- stack = new CustomStack <>();
17
+ stack = new CustomConcurrentStack <>();
18
18
}
19
19
20
20
@ Test
You can’t perform that action at this time.
0 commit comments