According to your code, the mywaithandles(0) may have no handle info at all.
I would suggest to sligly change your code to this untested example:
<MTAThread()> Public Sub file_search()
Dim DD() As String = Directory.GetDirectories(Searcher_path)
Dim mywaithandles() As AutoResetEvent = Nothing
Dim currentHandleIdx as Integer = -1
For i As Integer = 0 To DD.Length - 1
If is_emty(DD(i))=false Then
If mywaithandles Is Nothing Then
ReDim mywaithandles(0)
Else
ReDim Preserve mywaithandles(mywaithandles.Length)
End If
currentHandleIdx = mywaithandles.Length -1
mywaithandles(currentHandleIdx) = New AutoResetEvent(False)
Dim th_info As Threadinfo = New Threadinfo(DD(i), mywaithandles(currentHandleIdx))
ThreadPool.QueueUserWorkItem(AddressOf searcher_thread, th_info)
End If
Next
If Not mywaithandles Is Nothing then WaitHandle.WaitAll(mywaithandles)
end sub
Hope this helps