Mike Oliver wrote: > I have two other threads running, but I did not create them using NSPR, but > rather as Win32 ::CreateThread calls. Could this be causing the problem? Any > other thoughts? Would you recommend that I download all the source and step > into PR_Cleanup w/ the debugger?
If those threads call an NSPR function, they may be given an NSPR thread ID. If so, they would be considered a PR_USER_THREAD and PR_Cleanup would wait for their termination. In hindsight, these "attached" threads probably should be considered PR_SYSTEM_THREAD's. My suggestion is to not call PR_Cleanup(). It is okay to omit the PR_Cleanup() call. All the resources created by NSPR, such as file descriptors and memory allocated from the heap, are automatically cleaned up by the OS upon process exit. Wan-Teh
