TRQ-1646. Fix a deadlock when submitting one large array that depends on another large array submitted immediately before it.
TRQ-1605. Make monitor_route_retry_thread() check for the value of (pthread_t)-1 before checking if the process still exists, as -1 indicates that it doesn't.