[Bug]: 产生数据竞争 #486
Labels
bug
Something isn't working
needs fix
pending development
Requested PR owner to improve code and waiting for the result
Actions I've taken before I'm here
What happened?
当在两个goroutine里调用gnet.Run()时,gnet.Run()函数内的logger产生数据竞争.
因为我需要在一个程序里用两个端口提供各自不同的服务,所以启用了两个gnet服务,产生上述问题。
Major version of gnet
v2
Specific version of gnet
v2.3.0
Operating system
macOS
OS version
Darwin 22.3.0 x86_64
Go version
go1.20
Relevant log output
Code snippets (optional)
How to Reproduce
1.将gnet.Run()放在两个goroutine中
2.每个gnet.Run监听不同的端口
3.启动程序
4. go run -race main.go 产生竞争输出
Does this issue reproduce with the latest release?
It can reproduce with the latest release
The text was updated successfully, but these errors were encountered: