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
Document File: 2 page(s) / 46K

Publishing Venue

IBM

Abstract

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.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 79% of the total text.

Page 1 of 2

Automatic Release of Thread Local Variables

   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 thr...