Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: devchat-ai/gopool Loading
base: v0.3.0
Choose a base ref
...
head repository: devchat-ai/gopool Loading
compare: v0.4.0
Choose a head ref
  • 9 commits
  • 7 files changed
  • 2 contributors

Commits on Jul 26, 2023

  1. Add logos

    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    6929bfd View commit details
    Browse the repository at this point in the history
  2. Update gopool.png

    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    9dde896 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Add Task Retry feature documentation and unit test

    - Added English and Chinese documentation for the Task Retry feature in README.md and README_zh.md respectively.
    - Included an example of how to use the Task Retry feature in GoPool.
    - Added a unit test for the Task Retry feature in gopool_test.go.
    - The unit test checks that a task is retried the correct number of times.
    
    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    d61e43f View commit details
    Browse the repository at this point in the history
  2. Update task examples in README.md and README_zh.md

    - Updated the task examples in README.md and README_zh.md to return a result and an error.
    - This change reflects the updated task signature in GoPool.
    
    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    b109a03 View commit details
    Browse the repository at this point in the history
  3. Update go get command in readme

    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    d1a07e8 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Configuration menu
    Copy the full SHA
    61a9747 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from oliver258/ticker_leak

    Notify adjustWorkers to exit to prevent ticker resource leak
    daniel-hutao committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    1d136d7 View commit details
    Browse the repository at this point in the history
  3. Refactor goroutine pool to use context for graceful exit

    - Replace `exitChan` with `context.Context` and `context.CancelFunc` in `goPool` struct.
    - Create a cancellable context in `NewGoPool` function and store the context and cancel function in `goPool` struct.
    - Call the cancel function in `Release` method to notify all goroutines to exit.
    - Listen to the Done channel of the context in `adjustWorkers` method to exit the goroutine when the context is cancelled.
    
    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    2ea0ed3 View commit details
    Browse the repository at this point in the history
  4. Introduce GoPool interface and update NewGoPool function

    - Introduced a new GoPool interface that includes all public methods of the goPool struct.
    - Updated the NewGoPool function to return the GoPool interface instead of the goPool struct.
    - This change makes the GoPool interface visible outside the package and allows for future extensions with different GoPool implementations.
    
    Signed-off-by: Daniel Hu <[email protected]>
    daniel-hutao committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    98d2a09 View commit details
    Browse the repository at this point in the history
Loading