Added support for threaded subprocess execution with "graceful" timeouts