Skip to content

Potential bug in internal/runtime/ThreadService? #4844

@nick-someone

Description

@nick-someone

if (rubyThreadMap.size() >= 0) polling = true;

Here, and a bit below, a Map's (a synchronized WeakHashMap) size is checked as being >= 0 to twiddle the state of the polling field.

I'm pretty sure WeakHashMap would never return a size < 0. I haven't fully grasped the rest of the file (should this only be set iff there's more than 1 active thread?), but certainly if (map.size() >= 0) is always going to be true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions