Update to go v1.17
This commit is contained in:
@@ -12,6 +12,7 @@ go:
|
|||||||
- 1.14.x
|
- 1.14.x
|
||||||
- 1.15.x
|
- 1.15.x
|
||||||
- 1.16.x
|
- 1.16.x
|
||||||
|
- 1.17.x
|
||||||
|
|
||||||
# Enable Go Modules
|
# Enable Go Modules
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/alitto/pond/examples/dynamic_size
|
module github.com/alitto/pond/examples/dynamic_size
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alitto/pond v1.5.1
|
github.com/alitto/pond v1.5.1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/alitto/pond/examples/fixed_size
|
module github.com/alitto/pond/examples/fixed_size
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alitto/pond v1.5.1
|
github.com/alitto/pond v1.5.1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/alitto/pond/examples/fixed_size
|
module github.com/alitto/pond/examples/fixed_size
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alitto/pond v1.5.1
|
github.com/alitto/pond v1.5.1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/alitto/pond/examples/task_group
|
module github.com/alitto/pond/examples/task_group
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alitto/pond v1.5.1
|
github.com/alitto/pond v1.5.1
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module github.com/alitto/pond
|
module github.com/alitto/pond
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|||||||
@@ -141,16 +141,16 @@ func TestSubmitBefore(t *testing.T) {
|
|||||||
|
|
||||||
// Submit a long-running task
|
// Submit a long-running task
|
||||||
var doneCount int32
|
var doneCount int32
|
||||||
pool.SubmitBefore(func() {
|
pool.Submit(func() {
|
||||||
time.Sleep(5 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
atomic.AddInt32(&doneCount, 1)
|
atomic.AddInt32(&doneCount, 1)
|
||||||
}, 1*time.Millisecond)
|
})
|
||||||
|
|
||||||
// Submit a task that times out after 2ms
|
// Submit a task that times out after 2ms
|
||||||
pool.SubmitBefore(func() {
|
pool.SubmitBefore(func() {
|
||||||
time.Sleep(5 * time.Millisecond)
|
time.Sleep(5 * time.Millisecond)
|
||||||
atomic.AddInt32(&doneCount, 1)
|
atomic.AddInt32(&doneCount, 1)
|
||||||
}, 2*time.Millisecond)
|
}, 5*time.Millisecond)
|
||||||
|
|
||||||
pool.StopAndWait()
|
pool.StopAndWait()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user