Commit f025e3f3 authored by fangyincheng's avatar fangyincheng

change gstime and gssync to gxtime and gxsync

parent ba5c0707
......@@ -16,7 +16,7 @@ import (
)
import (
gssync "github.com/dubbogo/gost/sync"
gxsync "github.com/dubbogo/gost/sync"
perrors "github.com/pkg/errors"
)
......@@ -157,7 +157,7 @@ type Session interface {
SetRQLen(int)
SetWQLen(int)
SetWaitTime(time.Duration)
SetTaskPool(*gssync.TaskPool)
SetTaskPool(*gxsync.TaskPool)
GetAttribute(interface{}) interface{}
SetAttribute(interface{}, interface{})
......
......@@ -20,8 +20,8 @@ import (
)
import (
gssync "github.com/dubbogo/gost/sync"
gstime "github.com/dubbogo/gost/time"
gxsync "github.com/dubbogo/gost/sync"
gxtime "github.com/dubbogo/gost/time"
"github.com/gorilla/websocket"
perrors "github.com/pkg/errors"
)
......@@ -45,10 +45,10 @@ const (
/////////////////////////////////////////
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
}
......@@ -73,7 +73,7 @@ type session struct {
// handle logic
maxMsgLen int32
// task queue
tPool *gssync.TaskPool
tPool *gxsync.TaskPool
// heartbeat
period time.Duration
......@@ -311,7 +311,7 @@ func (s *session) SetWaitTime(waitTime time.Duration) {
}
// set task pool
func (s *session) SetTaskPool(p *gssync.TaskPool) {
func (s *session) SetTaskPool(p *gxsync.TaskPool) {
s.lock.Lock()
defer s.lock.Unlock()
......@@ -491,7 +491,7 @@ func (s *session) handleLoop() {
wsFlag bool
wsConn *gettyWSConn
// start time.Time
counter gstime.CountWatch
counter gxtime.CountWatch
inPkg 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