The InnovationQ application will be updated on Sunday, May 31st from 10am-noon ET. You may experience brief service interruptions during that time.
Browse Prior Art Database

Automatic Release of Thread Local Variables

IP.com Disclosure Number: IPCOM000013000D
Original Publication Date: 2001-Nov-01
Included in the Prior Art Database: 2003-Jun-12

Publishing Venue



A program is disclosed that a thread pool can automatically release the allocated thread-local variables when the threads in the pool go back to the thread pool. This technology can be applied to various practical usages such as storing meta-information into the thread local variable in RPC like SOAP and RMI, thread-wise authorization with Java security manager (Fig 6), and reusing a instance of the event handler in SAX under the multi-thread environment, in which the handler stores the result into the thread local variable. Thread local variable is useful for programmers because it can be used to share programming semantics and/or properties among more than one objects called by the same thread even if the interface is defined by someone else and it cannot be changed. Furthermore, thread local variable can be used as software cache on multi-thread systems as well. However, most of major programming languages like C/C++ and Java do not support thread local variable as its language syntax. This indicates that once a thread local variable is allocated by a program, the program must be responsible for releasing the variable at the appropriate time. In other words, it is not released automatically by the language even in Java, which has garbage collection functionality. The disclosed technology can solve this problem by using thread pool. In the thread pool, some threads are stocked to be reused when clients request for threads. When the thread completes a given task, it goes back to the thread pool automatically. In this technology, the thread pool can release the allocated thread local variable in processing the task at this moment (Fig 1). Programmers become free from taking care about releasing the thread local variables with this technique. 1 2