]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/yamux/util.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / yamux / util.go
index 5fe45afcdf2cc0ebb1f380cf84cc97de5924dd56..8a73e9249a616b4de5cfff2d97a3b3dc18797400 100644 (file)
@@ -1,5 +1,20 @@
 package yamux
 
+import (
+       "sync"
+       "time"
+)
+
+var (
+       timerPool = &sync.Pool{
+               New: func() interface{} {
+                       timer := time.NewTimer(time.Hour * 1e6)
+                       timer.Stop()
+                       return timer
+               },
+       }
+)
+
 // asyncSendErr is used to try an async send of an error
 func asyncSendErr(ch chan error, err error) {
        if ch == nil {