summaryrefslogtreecommitdiff
path: root/static_pool_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-10-20 17:01:49 +0300
committerValery Piashchynski <[email protected]>2020-10-20 17:01:49 +0300
commit66b445471b1e85f77a40d9f426ac5e8e4baa8de8 (patch)
treeb38d07d0415437f2a66cfd4d1ccb2f2ccb22b35d /static_pool_test.go
parentf5fe854a632bf778c3b6d04c298fe92a64a1f9b6 (diff)
fix memory reordering in the tests??
Diffstat (limited to 'static_pool_test.go')
-rw-r--r--static_pool_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/static_pool_test.go b/static_pool_test.go
index fd8124ac..e986a9bf 100644
--- a/static_pool_test.go
+++ b/static_pool_test.go
@@ -8,6 +8,7 @@ import (
"runtime"
"strconv"
"sync"
+ "sync/atomic"
"testing"
"time"
@@ -173,6 +174,8 @@ func Test_StaticPool_Broken_Replace(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ var i int64
+ atomic.StoreInt64(&i, 10)
go func() {
for {