Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add task timeout handling and update README
- Added a timeout field to the goPool struct to store the global timeout duration. - Created a WithTimeout function to set this timeout duration. - Added timeout handling logic in the worker.start method. If a task is not completed within the specified timeout period, it is considered failed and a timeout error is returned. - Updated the README file to include the new task timeout handling feature and removed outdated "For example" descriptions. Signed-off-by: Daniel Hu <tao.hu@merico.dev>
- Loading branch information
1 parent
8ea252a
commit ade1387
Showing
4 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters