首页>
外国专利>
Mechanism for enabling a thread unaware or non thread safe application to be executed safely in a multi-threaded environment
Mechanism for enabling a thread unaware or non thread safe application to be executed safely in a multi-threaded environment
展开▼
机译:使多线程环境中无线程或非线程安全应用程序能够安全执行的机制
展开▼
页面导航
摘要
著录项
相似文献
摘要
Executing a thread unaware or non-thread-safe application in a multi-threaded environment is potentially hazardous. If multiple instances of the thread unaware application are executed concurrently in the same process space, as may be the case in a multi-threaded environment, one instance may try to modify or overwrite the information used by the other instance, which can lead to serious errors. To enable a thread unaware application to be executed safely in a multi-threaded environment, multiple thread pools are implemented. That is, for each thread-unaware or non-thread-safe application, a separate thread pool is defined and associated with the application. Unlike other thread pools, though, this thread pool has its maximum number of threads parameter set to “1”. By limiting the number of threads in the pool to 1, it is guaranteed that there will be no more than one instance of the thread unaware application executing at any one time. This in turn precludes any possibility of one instance of the application overwriting or modifying the information used by another. By implementing thread pools in this manner, execution of the thread-unaware application in a multi-threaded environment is made safe.
展开▼