in reply to Re^2: PANIC: underlying join failed threded tcp server
in thread PANIC: underlying join failed threded tcp server
'The handle is invalid' at rxd.pl line
The handle in question would have to be the thread handle itself; which suggests that it has some how become invalid between beong returned from threads->list(threads::joinable) and your calling join(). Which -- provided there are no other detach() than the one shown commented out -- should not be possible!
As a discovery measure, you could try calling the handle method pprint $join->_handle(); prior to doing the join and see what that yields?
The only other diagnostic measures I can think of, would entail adding some trace into the threads.xs module. If you're up for that, you could try adding:
printf( "thread handle:%x thread-id: %dx\n", thread->handle, GetThread +Id( thread->handle ) );
just before the if(WaitForSingleObject()) call. It might add some info.
You should also add a call to GetLastError() and print out that and teh failing return code within the body of the if, prior to the PANIC.
|
|---|