[forward-port] txn queue polling with timeout.