|
-
June 7th, 2005, 08:59 AM
#1
Strange Deadlock while terminating a thread
Hi,
i encountered a strange error in my application.
As the whole code is quite too complex to post here, i try a short version
of the problem.
First, I have a thread, which calls an Execute-Function in a Plugin-Kind
class ( A user of our API is free to fill this Execute-Function with its own code ).
In this case the Execute-Function consists of an endless while-loop, without any sleep in it, just allocating a huge amount of memory ( I know, not very
sensfully, but the user is free to do this ).
Now i want to stop this thread:
I Send a Stop-Thread signal.
If the Execute-Function is programmed properly it should react on this signal and leave the Execute.
But in this case it does not.
Now i wait for a, lets say 5 seconds, and then i Terminate the Thread.
And now the obscure.
When i try to delete the Thread-Object i run in a deadlock in the heap.
( O.K.: I forgot: i'm using MVS7.NET under WinXP prof. - standard C++ Dll Project ).
I found, that is not a problem of the Debug-Heap ( Here i can see, where the thread hangs ). The problem also occurs in the release version.
Any ideas about that ?
Any hint is welcome.
Greetings,
Matze
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|