Skip to content

加锁吗? #10

@lzb200244

Description

@lzb200244

p.RLock()
current := atomic.LoadInt32(&p.current)
p.RUnlock()

请问一下,使用了atomic为什么还需要加锁?加锁和原子化是不是其中有一个多余了呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions