Home / Function/ testRecycleAtDifferentThread() — netty Function Reference

testRecycleAtDifferentThread() — netty Function Reference

Architecture documentation for the testRecycleAtDifferentThread() function in RecyclerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d56f21e1_98b4_0a44_24ff_56df7b6fb595["testRecycleAtDifferentThread()"]
  46ac14b1_2382_5afa_98f3_803182070b38["RecyclerTest"]
  d56f21e1_98b4_0a44_24ff_56df7b6fb595 -->|defined in| 46ac14b1_2382_5afa_98f3_803182070b38
  87dca999_f804_a974_e326_fd8f527f1246["newRecycler()"]
  d56f21e1_98b4_0a44_24ff_56df7b6fb595 -->|calls| 87dca999_f804_a974_e326_fd8f527f1246
  43ab40f6_52e7_0fe9_a79f_220021939268["recycle()"]
  d56f21e1_98b4_0a44_24ff_56df7b6fb595 -->|calls| 43ab40f6_52e7_0fe9_a79f_220021939268
  style d56f21e1_98b4_0a44_24ff_56df7b6fb595 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/RecyclerTest.java lines 454–473

    @ParameterizedTest
    @MethodSource("notNoneOwnerAndUnguarded")
    public void testRecycleAtDifferentThread(OwnerType ownerType, boolean unguarded) throws Exception {
        final Recycler<HandledObject> recycler = newRecycler(ownerType, unguarded, 256, 2, 16);
        final HandledObject o = recycler.get();
        final HandledObject o2 = recycler.get();

        final Thread thread = newThread(new Runnable() {
            @Override
            public void run() {
                o.recycle();
                o2.recycle();
            }
        });
        thread.start();
        thread.join();

        assertSame(recycler.get(), o);
        assertNotSame(recycler.get(), o2);
    }

Domain

Subdomains

Frequently Asked Questions

What does testRecycleAtDifferentThread() do?
testRecycleAtDifferentThread() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/RecyclerTest.java.
Where is testRecycleAtDifferentThread() defined?
testRecycleAtDifferentThread() is defined in common/src/test/java/io/netty/util/RecyclerTest.java at line 454.
What does testRecycleAtDifferentThread() call?
testRecycleAtDifferentThread() calls 2 function(s): newRecycler, recycle.

Analyze Your Own Codebase

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

Try Supermodel Free