Thread Calls DLL, DLL Loops Infin, Application Stuck

T

Toli

I have a problem with threading in vb.net, it seems if a dll freezes
or falls into an infinite loop, my multithreaded program starts
allocating more threads because it cant use the frozen thread

for example:

declare function testit lib "test.dll" (somearg as integer) as integer
dim thdTest as threading.thread

sub runtest()
thdTest= new threading.thread(addressof mytest)
thdTest.start
end sub

sub mytest()
dim i as integer
i = testit(0)
'If the dll call loops infinitely/freezes
'this thread is dead in the water
'and cannot be aborted, used, killed
'and it stays in memory til the
'application is forcefully terminated
end sub

sub killtest()
thdTest.abort 'would not abort the thread
end sub

The DLL must be used, the code in it would take a VERY long time to
recode and the original source is not avaliable (to debug).

If I was able to successfully terminate, the frozen thread, it would
not be a problem, but I can't (dont know of any method).

Any advice? Thanks in advance.
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed)2g.com (Toli) scripsit:
The DLL must be used, the code in it would take a VERY long time to
recode and the original source is not avaliable (to debug).

If you think that there is a /bug/ in the DLL, I would contact the
author, if possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top