Home / Class/ TestThread Class — netty Architecture

TestThread Class — netty Architecture

Architecture documentation for the TestThread class in SingleThreadEventExecutorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  aa648993_4db6_5acf_396a_b54275d221f3["TestThread"]
  68341706_e7dd_ee7e_305a_0cb38675254c["SingleThreadEventExecutorTest.java"]
  aa648993_4db6_5acf_396a_b54275d221f3 -->|defined in| 68341706_e7dd_ee7e_305a_0cb38675254c
  4da16008_9a16_a3d0_ed4d_10938bf5540f["TestThread()"]
  aa648993_4db6_5acf_396a_b54275d221f3 -->|method| 4da16008_9a16_a3d0_ed4d_10938bf5540f
  86d8db25_b4c5_af2c_57ab_921c9152a132["start()"]
  aa648993_4db6_5acf_396a_b54275d221f3 -->|method| 86d8db25_b4c5_af2c_57ab_921c9152a132
  9c91a79a_8244_28e9_48f3_27d3bfdd242b["run()"]
  aa648993_4db6_5acf_396a_b54275d221f3 -->|method| 9c91a79a_8244_28e9_48f3_27d3bfdd242b
  11b0d45f_e1b4_6dba_6d37_6c2f82f7e5c1["awaitStarted()"]
  aa648993_4db6_5acf_396a_b54275d221f3 -->|method| 11b0d45f_e1b4_6dba_6d37_6c2f82f7e5c1
  17ece757_7f91_5c24_4f58_cd664388b701["awaitRunnableExecution()"]
  aa648993_4db6_5acf_396a_b54275d221f3 -->|method| 17ece757_7f91_5c24_4f58_cd664388b701

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/SingleThreadEventExecutorTest.java lines 47–74

    private static final class TestThread extends Thread {
        private final CountDownLatch startedLatch = new CountDownLatch(1);
        private final CountDownLatch runLatch = new CountDownLatch(1);

        TestThread(Runnable task) {
            super(task);
        }

        @Override
        public void start() {
            super.start();
            startedLatch.countDown();
        }

        @Override
        public void run() {
            runLatch.countDown();
            super.run();
        }

        void awaitStarted() throws InterruptedException {
            startedLatch.await();
        }

        void awaitRunnableExecution() throws InterruptedException {
            runLatch.await();
        }
    }

Frequently Asked Questions

What is the TestThread class?
TestThread is a class in the netty codebase, defined in common/src/test/java/io/netty/util/concurrent/SingleThreadEventExecutorTest.java.
Where is TestThread defined?
TestThread is defined in common/src/test/java/io/netty/util/concurrent/SingleThreadEventExecutorTest.java at line 47.

Analyze Your Own Codebase

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

Try Supermodel Free