Unlock while yielding execute concurrent generator results
Fixes an issue where the event thread could be held up on the executor lock while the client thread waits for a paged result to return.
This commit is contained in:
		| @@ -166,9 +166,11 @@ class ConcurrentExecutorGenResults(_ConcurrentExecutor): | ||||
|                     self._condition.wait() | ||||
|                 while self._results_queue and self._results_queue[0][0] == self._current: | ||||
|                     _, res = heappop(self._results_queue) | ||||
|                     self._condition.release() | ||||
|                     if self._fail_fast and not res[0]: | ||||
|                         self._raise(res[1]) | ||||
|                     yield res | ||||
|                     self._condition.acquire() | ||||
|                     self._current += 1 | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Adam Holmberg
					Adam Holmberg