[SERVER-62800] Create Condition Variable Helper Class To Enforce State Mutation & Notification Contract Created: 20/Jan/22 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Luis Osta (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | sa-remove-fv-backlog-22 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Service Arch
|
| Participants: | |
| Story Points: | 2 |
| Description |
|
The inspiration for this ticket originated from the bug fixed by Instead of relying on the developer remembering to adhere to the contract, we should create a helper class that will explicitly enforce this contract. This would be for a simple condition variable use case that is relatively common: one single state variable that changes and when it changes all threads waiting on a change should be notified. From my investigation I think that the class should expose the following functions:
Though other solutions that will explicitly enforce the contract for that common pattern will also work. |