Skip to content

math/rand: default Source safe for concurrent use #12471

@awilliams

Description

@awilliams

The math/rand documentation states:

The default Source is safe for concurrent use by multiple goroutines.

This confused me because I thought the "default Source" referred to Source returned by the NewSource function. Instead, it refers to the protected internal Source used by the top-level functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions