SNA Server Win32 API Calls May Not Return to Multithreaded App (159350)
The information in this article applies to:
- Microsoft SNA Server 2.0
- Microsoft SNA Server 2.1
- Microsoft SNA Server 2.11
- Microsoft SNA Server 2.11 SP1
- Microsoft SNA Server 2.11 SP2
- Microsoft SNA Server 3.0
- Microsoft SNA Server 3.0 SP1
- Microsoft SNA Server 3.0 SP2
- Microsoft SNA Server 3.0 SP3
- Microsoft SNA Server 4.0
- Microsoft SNA Server 4.0 SP1
- Microsoft SNA Server 4.0 SP2
This article was previously published under Q159350 SYMPTOMS
If you write a multithreaded 32-bit Windows application to handle multiple
concurrent CPIC conversations, you may find that some of the application's
threads hang, for example on a CPIC request (CMALLC or CMRCV); these
threads never complete. The problem occurs when up to 90 concurrent threads
(each one handling a different CPIC conversation) are spawned.
CAUSE
The problem is caused by the application. The application calls the
_beginthread() function to create a new thread, and then closes this thread
handle from the main application as soon as _beginthread() completed
successfully.
WORKAROUND
To work around this problem:
- Remove the close request from the application.
- Terminate each thread by calling the _endthread function.
Also see the reference section below for information on a better way to
write such applications.
The problem was solved when this close request was removed from his
application. Each thread was terminated by calling the _endthread function.
Modification Type: | Minor | Last Reviewed: | 5/17/2005 |
---|
Keywords: | kbnetwork kbprogramming KB159350 |
---|
|