Home / Function/ racyOtherSubmissionMissWakeup() — netty Function Reference

racyOtherSubmissionMissWakeup() — netty Function Reference

Architecture documentation for the racyOtherSubmissionMissWakeup() function in ManualEventLoopTest.java from the netty codebase.

Function java Buffer Search calls 3 called by 2

Entity Profile

Dependency Diagram

graph TD
  e2eaad12_7108_a22e_49dd_3bdd336a1360["racyOtherSubmissionMissWakeup()"]
  e45aee7f_05b1_581f_0dc9_9f5ffbeab685["ManualEventLoopTest"]
  e2eaad12_7108_a22e_49dd_3bdd336a1360 -->|defined in| e45aee7f_05b1_581f_0dc9_9f5ffbeab685
  42afbec2_1dfb_e08c_b283_a1e6579cd752["firstRacyOtherSubmissionMissWakeupEpoll()"]
  42afbec2_1dfb_e08c_b283_a1e6579cd752 -->|calls| e2eaad12_7108_a22e_49dd_3bdd336a1360
  6d1b089c_a048_4926_376c_556dad8e7de4["secondRacyOtherSubmissionMissWakeupEpoll()"]
  6d1b089c_a048_4926_376c_556dad8e7de4 -->|calls| e2eaad12_7108_a22e_49dd_3bdd336a1360
  a00476b1_7dfb_d468_f53a_dbba89da2249["ManualMultithreadedIoEventLoopGroup()"]
  e2eaad12_7108_a22e_49dd_3bdd336a1360 -->|calls| a00476b1_7dfb_d468_f53a_dbba89da2249
  ee4df638_05ee_494c_0499_c03ca51b00e5["beforeCanBlock()"]
  e2eaad12_7108_a22e_49dd_3bdd336a1360 -->|calls| ee4df638_05ee_494c_0499_c03ca51b00e5
  d3622feb_d0a1_b069_819a_5203feae0519["execute()"]
  e2eaad12_7108_a22e_49dd_3bdd336a1360 -->|calls| d3622feb_d0a1_b069_819a_5203feae0519
  style e2eaad12_7108_a22e_49dd_3bdd336a1360 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-native-epoll/src/test/java/io/netty/channel/epoll/ManualEventLoopTest.java lines 96–128

    private void racyOtherSubmissionMissWakeup(IoHandlerFactory handlerFactory, long canBlockAttempt)
            throws Exception {
        CyclicBarrier waitBeforeSubmittingTask = new CyclicBarrier(2);
        CountDownLatch taskSubmitted = new CountDownLatch(1);
        AtomicLong canBlock = new AtomicLong(0);
        ManualMultithreadedIoEventLoopGroup group = new ManualMultithreadedIoEventLoopGroup(handlerFactory) {
            @Override
            protected void beforeCanBlock(Executor executor) {
                // this should be called when canBlock is called after setting the wakeup flag!
                if (canBlock.incrementAndGet() == canBlockAttempt) {
                    try {
                        waitBeforeSubmittingTask.await();
                    } catch (Throwable ignore) {
                        //
                    }
                    try {
                        taskSubmitted.await();
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        };
        waitBeforeSubmittingTask.await();
        CountDownLatch completed = new CountDownLatch(1);
        // depending on canBlockAttempt this submission could observe an AWAKE event loop
        // or with a setup NONE deadline (e.g. Long.MAX_VALUE).
        // In the latter case, it can be already asleep or ready to do it.
        group.ioEventLoopRunner.execute(completed::countDown);
        taskSubmitted.countDown();
        completed.await();
        group.shutdownGracefully(0, 0, TimeUnit.SECONDS).get();
    }

Domain

Subdomains

Frequently Asked Questions

What does racyOtherSubmissionMissWakeup() do?
racyOtherSubmissionMissWakeup() is a function in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/ManualEventLoopTest.java.
Where is racyOtherSubmissionMissWakeup() defined?
racyOtherSubmissionMissWakeup() is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/ManualEventLoopTest.java at line 96.
What does racyOtherSubmissionMissWakeup() call?
racyOtherSubmissionMissWakeup() calls 3 function(s): ManualMultithreadedIoEventLoopGroup, beforeCanBlock, execute.
What calls racyOtherSubmissionMissWakeup()?
racyOtherSubmissionMissWakeup() is called by 2 function(s): firstRacyOtherSubmissionMissWakeupEpoll, secondRacyOtherSubmissionMissWakeupEpoll.

Analyze Your Own Codebase

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

Try Supermodel Free