Commit f025e3f3 authored by fangyincheng's avatar fangyincheng

change gstime and gssync to gxtime and gxsync

parent ba5c0707
...@@ -16,7 +16,7 @@ import ( ...@@ -16,7 +16,7 @@ import (
) )
import ( import (
gssync "github.com/dubbogo/gost/sync" gxsync "github.com/dubbogo/gost/sync"
perrors "github.com/pkg/errors" perrors "github.com/pkg/errors"
) )
...@@ -157,7 +157,7 @@ type Session interface { ...@@ -157,7 +157,7 @@ type Session interface {
SetRQLen(int) SetRQLen(int)
SetWQLen(int) SetWQLen(int)
SetWaitTime(time.Duration) SetWaitTime(time.Duration)
SetTaskPool(*gssync.TaskPool) SetTaskPool(*gxsync.TaskPool)
GetAttribute(interface{}) interface{} GetAttribute(interface{}) interface{}
SetAttribute(interface{}, interface{}) SetAttribute(interface{}, interface{})
......
...@@ -20,8 +20,8 @@ import ( ...@@ -20,8 +20,8 @@ import (
) )
import ( import (
gssync "github.com/dubbogo/gost/sync" gxsync "github.com/dubbogo/gost/sync"
gstime "github.com/dubbogo/gost/time" gxtime "github.com/dubbogo/gost/time"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
perrors "github.com/pkg/errors" perrors "github.com/pkg/errors"
) )
...@@ -45,10 +45,10 @@ const ( ...@@ -45,10 +45,10 @@ const (
///////////////////////////////////////// /////////////////////////////////////////
var ( var (
wheel = gstime.NewWheel(gstime.TimeMillisecondDuration(100), 1200) // wheel longest span is 2 minute wheel = gxtime.NewWheel(gxtime.TimeMillisecondDuration(100), 1200) // wheel longest span is 2 minute
) )
func GetTimeWheel() *gstime.Wheel { func GetTimeWheel() *gxtime.Wheel {
return wheel return wheel
} }
...@@ -73,7 +73,7 @@ type session struct { ...@@ -73,7 +73,7 @@ type session struct {
// handle logic // handle logic
maxMsgLen int32 maxMsgLen int32
// task queue // task queue
tPool *gssync.TaskPool tPool *gxsync.TaskPool
// heartbeat // heartbeat
period time.Duration period time.Duration
...@@ -311,7 +311,7 @@ func (s *session) SetWaitTime(waitTime time.Duration) { ...@@ -311,7 +311,7 @@ func (s *session) SetWaitTime(waitTime time.Duration) {
} }
// set task pool // set task pool
func (s *session) SetTaskPool(p *gssync.TaskPool) { func (s *session) SetTaskPool(p *gxsync.TaskPool) {
s.lock.Lock() s.lock.Lock()
defer s.lock.Unlock() defer s.lock.Unlock()
...@@ -491,7 +491,7 @@ func (s *session) handleLoop() { ...@@ -491,7 +491,7 @@ func (s *session) handleLoop() {
wsFlag bool wsFlag bool
wsConn *gettyWSConn wsConn *gettyWSConn
// start time.Time // start time.Time
counter gstime.CountWatch counter gxtime.CountWatch
inPkg interface{} inPkg interface{}
outPkg interface{} outPkg interface{}
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment