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.
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.