Skip to content

sync::Semaphore needs to require nonnegative initial resource count #15758

Closed
@bblum

Description

@bblum

https://github.com/rust-lang/rust/blob/master/src/libsync/raw.rs#L153

if state.count <= 0 {

should be

if state.count >= 0 {

@alexcrichton, please confirm

it looks like i introduced this by accident in 604e4ad? No idea what i was thinking.

edit: changed title; see below

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions