Skip to content

Commit 88feb0e

Browse files
committed
chore: 升级task版本
1 parent b50142b commit 88feb0e

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ func newConn(fd int, safeConns *core.SafeConns[Conn],
4444
var taskExecutor driver.TaskExecutor
4545
switch taskType {
4646
case TaskTypeInConnectionGoroutine:
47-
taskExecutor = task.newTask("stream")
47+
taskExecutor = task.newTask("onebyone")
4848
case TaskTypeInEventLoop:
4949
// 不做任何事情
5050
case TaskTypeInBusinessGoroutine:
51-
taskExecutor = task.newTask("stream2")
51+
taskExecutor = task.newTask("stream")
5252
default:
5353
panic("invalid task type")
5454
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/antlabs/pulse
33
go 1.24.1
44

55
require (
6-
github.com/antlabs/task v0.0.0-20250615065052-8249dcd16d96
6+
github.com/antlabs/task v0.0.0-20250629140636-3fd744b4c2c7
77
golang.org/x/sys v0.31.0
88
)
99

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/antlabs/task v0.0.0-20250615065052-8249dcd16d96 h1:C1nFdgUt1n2F/zwpIu+sit6BIVvpUScFQC4KePsvLzU=
2-
github.com/antlabs/task v0.0.0-20250615065052-8249dcd16d96/go.mod h1:6YSWbWdHmW/4s9L0RkmiSCqAf0qmhmb119yzaSbJXww=
1+
github.com/antlabs/task v0.0.0-20250629140636-3fd744b4c2c7 h1:Q+whQMX7LjTNx2zp56ZBlz5NnzeBMy8U2i/RaLSmlJM=
2+
github.com/antlabs/task v0.0.0-20250629140636-3fd744b4c2c7/go.mod h1:6YSWbWdHmW/4s9L0RkmiSCqAf0qmhmb119yzaSbJXww=
33
github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw=
44
github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
55
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=

multi_event_loops.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515

1616
"github.com/antlabs/pulse/core"
1717
"github.com/antlabs/task/task/driver"
18+
_ "github.com/antlabs/task/task/onebyone"
1819
_ "github.com/antlabs/task/task/stream"
19-
_ "github.com/antlabs/task/task/stream2"
2020
)
2121

2222
type MultiEventLoop struct {
@@ -180,6 +180,8 @@ func (e *MultiEventLoop) ListenAndServe(addr string) error {
180180
c.flush()
181181
}
182182

183+
// flowBackPressure 主要是为了和删除读事件的背压模式做对比用的
184+
// 目前来看,删除读事件的背压模式更高效
183185
if e.options.flowBackPressure && c.needFlush() {
184186
if e.options.triggerType == core.TriggerTypeLevel {
185187
return

0 commit comments

Comments
 (0)