@@ -12,9 +12,9 @@ In order for the expected semantics to be obtained, some types require clients
12
12
to follow a specific protocol when calling the type's operations. Furthermore,
13
13
failing to follow the protocol can cause system-wide ill effects.
14
14
15
- For example, in the context of competing concurrent threads accessing shared
16
- resources, concurrency abstractions such as mutexes provide the mutually
17
- exclusive access necessary to prevent race conditions . These mutex objects must
15
+ For example, concurrency abstractions such as mutexes provide the mutually
16
+ exclusive access necessary to prevent the race conditions that arise when
17
+ competing concurrent threads access shared resources . These mutex objects must
18
18
be 1) both acquired and released, 2) by every thread accessing that shared
19
19
resource, 3) at the right places in the source code, and 4) in the proper
20
20
order. Failure to acquire the mutex prior to accessing the shared resource
@@ -325,7 +325,7 @@ that the type will be controlled because we don't intend :ada:`Initialize` and
325
325
326
326
No additional record components are required, beyond the access discriminant.
327
327
328
- Immediately following the type declaration, we declare overridden versions of
328
+ Immediately following the type declaration, we declare overriding versions of
329
329
the inherited procedures :ada: `Initialize ` and :ada: `Finalize `:
330
330
331
331
.. code-block :: ada
444
444
445
445
The lock is global, so all calls go through it. Hence all calls are sequential,
446
446
even if some could run concurrently. In the above example that's exactly as
447
- required, but in other situations it might be too limiting.
447
+ required, but in other situations it might be unnecessarily limiting.
448
448
449
449
Compared to the manual call approach, the run-time cost for keeping track of
450
450
objects to be finalized could be non-trivial. That's likely true in any
0 commit comments