Skip to content

Monitor allows multiple processes in to the critical section #18104

@akgrant43

Description

@akgrant43

Bug description

The Monitor class doesn't handle the scenario where a process that is waiting to enter the critical section is terminated. It currently incorrectly allows the next waiting process to enter the critical section.

To Reproduce
Steps to reproduce the behavior:

  1. Copy the tests from MutexTest to MonitorTest
  2. Run the tests
  3. #testTerminatingBlockedCriticalSectionShouldNotUnblockAnotherWaitingSection fails

Expected behavior

All tests pass.

Screenshots
N/A

Version information:

  • OS: NixOS
  • Version: 24.11
  • Pharo Version: 13

Expected development cost

2 days, but PR on the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions