Remove buggy calls to joinThread in parallel search

This commit is contained in:
Mattia Giambirtone 2024-05-14 02:07:59 +02:00
parent 403d5555f1
commit e54fc56925
Signed by: nocturn9x
GPG Key ID: 37B83AB6C3BE6514
1 changed files with 1 additions and 3 deletions

View File

@ -799,6 +799,4 @@ proc parallelSearch*(self: var SearchManager, timeRemaining, increment: int64, m
# Off you go, you little search minion!
createThread(workers[i][], workerFunc, (localSearcher, timeRemaining, increment, maxDepth, maxNodes, searchMoves, timePerMove, ponder))
result = self.findBestLine(timeRemaining, increment, maxDepth, maxNodes, searchMoves, timePerMove, ponder)
# Wait for workers to shut down
for i in 0..<numWorkers - 1:
joinThread(workers[i][])
# No need to wait for the threads, they'll finish alongside us anyway