concurrency pattern : timeout func