Go Mutex 流程

mutex 流程

type Mutex struct {
    state int32
    sema  uint32
}

等效于

type Mutex struct {
    locked uint
    woken uint
    starving uint
    waiterCount uint
    sema  uint32
}

posted @ 2024-06-24 09:39  Aloe_n  阅读(9)  评论(0)    收藏  举报