Skip to content

你好,老师 #17

@orbit-w

Description

@orbit-w

func Bind(pool string, caches ...Cache) error { c, _ := m.LoadOrStore(pool, &[]Cache{}) *(c.(*[]Cache)) = append(*(c.(*[]Cache)), caches...) return nil }
这段代码,多个 goroutine 并发调用 Bind 会导致数据竞争吗?可以帮我讲解一下

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