Home / Function/ testRacingGetAndGet() — netty Function Reference

testRacingGetAndGet() — netty Function Reference

Architecture documentation for the testRacingGetAndGet() function in NettyRuntimeTests.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  aa4f4027_a4c5_47e6_fd4c_ce729be0199c["testRacingGetAndGet()"]
  f8a8d4a2_21ee_fb99_d44b_e7434e8cbd80["NettyRuntimeTests"]
  aa4f4027_a4c5_47e6_fd4c_ce729be0199c -->|defined in| f8a8d4a2_21ee_fb99_d44b_e7434e8cbd80
  c66ca834_66fc_0dc3_a0c7_18e526fa3476["await()"]
  aa4f4027_a4c5_47e6_fd4c_ce729be0199c -->|calls| c66ca834_66fc_0dc3_a0c7_18e526fa3476
  style aa4f4027_a4c5_47e6_fd4c_ce729be0199c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/NettyRuntimeTests.java lines 71–97

    @Test
    public void testRacingGetAndGet() throws InterruptedException {
        final NettyRuntime.AvailableProcessorsHolder holder = new NettyRuntime.AvailableProcessorsHolder();
        final CyclicBarrier barrier = new CyclicBarrier(3);

        final AtomicReference<IllegalStateException> firstReference = new AtomicReference<IllegalStateException>();
        final Runnable firstTarget = getRunnable(holder, barrier, firstReference);
        final Thread firstGet = new Thread(firstTarget);
        firstGet.start();

        final AtomicReference<IllegalStateException> secondRefernce = new AtomicReference<IllegalStateException>();
        final Runnable secondTarget = getRunnable(holder, barrier, secondRefernce);
        final Thread secondGet = new Thread(secondTarget);
        secondGet.start();

        // release the hounds
        await(barrier);

        // wait for the hounds
        await(barrier);

        firstGet.join();
        secondGet.join();

        assertNull(firstReference.get());
        assertNull(secondRefernce.get());
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testRacingGetAndGet() do?
testRacingGetAndGet() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/NettyRuntimeTests.java.
Where is testRacingGetAndGet() defined?
testRacingGetAndGet() is defined in common/src/test/java/io/netty/util/NettyRuntimeTests.java at line 71.
What does testRacingGetAndGet() call?
testRacingGetAndGet() calls 1 function(s): await.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free