Home / Function/ testMultipleSetRemove_multipleThreadLocal() — netty Function Reference

testMultipleSetRemove_multipleThreadLocal() — netty Function Reference

Architecture documentation for the testMultipleSetRemove_multipleThreadLocal() function in FastThreadLocalTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  288bb74d_caad_9d5b_0139_522cfc079a4a["testMultipleSetRemove_multipleThreadLocal()"]
  c9cb652b_4141_8af2_1f8b_c47765bb30f9["FastThreadLocalTest"]
  288bb74d_caad_9d5b_0139_522cfc079a4a -->|defined in| c9cb652b_4141_8af2_1f8b_c47765bb30f9
  7fb6cd58_f112_73b3_6216_2819f285c975["run()"]
  288bb74d_caad_9d5b_0139_522cfc079a4a -->|calls| 7fb6cd58_f112_73b3_6216_2819f285c975
  style 288bb74d_caad_9d5b_0139_522cfc079a4a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/FastThreadLocalTest.java lines 158–188

    @Test
    public void testMultipleSetRemove_multipleThreadLocal() throws Exception {
        final FastThreadLocal<String> threadLocal = new FastThreadLocal<String>();
        final FastThreadLocal<String> threadLocal2 = new FastThreadLocal<String>();
        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                threadLocal.set("1");
                threadLocal.remove();
                threadLocal.set("2");
                threadLocal.remove();
                threadLocal2.set("1");
                threadLocal2.remove();
                threadLocal2.set("2");
                threadLocal2.remove();
            }
        };

        final int sizeWhenStart = ObjectCleaner.getLiveSetCount();
        Thread thread = new Thread(runnable);
        thread.start();
        thread.join();

        assertEquals(0, ObjectCleaner.getLiveSetCount() - sizeWhenStart);

        Thread thread2 = new Thread(runnable);
        thread2.start();
        thread2.join();

        assertEquals(0, ObjectCleaner.getLiveSetCount() - sizeWhenStart);
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testMultipleSetRemove_multipleThreadLocal() do?
testMultipleSetRemove_multipleThreadLocal() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/concurrent/FastThreadLocalTest.java.
Where is testMultipleSetRemove_multipleThreadLocal() defined?
testMultipleSetRemove_multipleThreadLocal() is defined in common/src/test/java/io/netty/util/concurrent/FastThreadLocalTest.java at line 158.
What does testMultipleSetRemove_multipleThreadLocal() call?
testMultipleSetRemove_multipleThreadLocal() calls 1 function(s): run.

Analyze Your Own Codebase

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

Try Supermodel Free