Microsoft SDK for Java

Using Thread Storage

The WFC Application class provides support for Thread Local Storage (TLS). Each thread can allocate a slot of memory for storing data that is specific to the thread. Calling Application.allocThreadStorage returns an index to that slot. To set a value in TLS, call the Application.setThreadStorage with the index and a value you want to set. To retrieve that value, call Application.getThreadStorage. You must free any allocated thread storage with a call to Application.freeThreadStorage.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.