Skip to content

Conversation

@rtyley
Copy link
Contributor

@rtyley rtyley commented Nov 12, 2025

Fixes a few things I found confusing about this example in the docs, where things were being called 'resources' when they were actually something acquiring/releasing a resource:

  • R1, R2, R3 were actually little programs or processes trying to acquire the resource guarded by the semaphore s, so I've renamed them P1, P2, P3
  • the PreciousResource class was really something that wanted to acquire a precious resource, I've renamed it SlowProcess here
  • rather than saying r1.use, say p1.execute

Fixes a few things I found confusing about this example, where things were being called 'resources' when they were actually something acquiring/releasing a resource:

* R1, R2, R3 were actually little programs or processes trying to acquire the resource guarded by the semaphore `s`, so I've renamed them P1, P2, P3
* the `PreciousResource` class was really something that wanted to _acquire_ a precious resource, I've renamed it `SlowProcess` here
* rather than saying `r1.use`, say `p1.execute`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant