1
0
mirror of https://github.com/fumiama/orbyte.git synced 2026-06-10 21:24:50 +08:00

fix: let trans not reset val

This commit is contained in:
源文雨
2025-02-25 13:44:48 +09:00
parent cab9bb4bc1
commit ad060ad98a
2 changed files with 16 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import "sync/atomic"
const (
statusisbuffered = 1 << iota
statusdestroyed
statusisintrans
)
type status uintptr
@@ -57,3 +58,11 @@ func (c *status) hasdestroyed() bool {
func (c *status) setdestroyed(v bool) {
c.setbool(v, statusdestroyed)
}
func (c *status) isintrans() bool {
return c.loadbool(statusisintrans)
}
func (c *status) setintrans(v bool) {
c.setbool(v, statusisintrans)
}