Index: doc/theses/colby_parsons_MMAth/text/channels.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/text/channels.tex	(revision 4897ffa5e2466ff9a784f13e117f1ccf68403830)
+++ doc/theses/colby_parsons_MMAth/text/channels.tex	(revision e4a2198dbb207c25b12e2fdc443185658cff7e48)
@@ -125,12 +125,12 @@
 The deadlock detection in the \CFA channels is fairly basic but detects a very common channel mistake during termination.
 That is, it detects the case where threads are blocked on the channel during channel deallocation.
-This case is guaranteed to deadlock since there are no producer threads to supply values needed by the waiting consumer threads.
-Only if a user maintained a separate reference to the consumer threads and manually unblocks them outside the channel could the deadlock be avoid.
-However, without special consumer semantics, this unblocking would generate other runtime errors where the consumer attempts to access non-existing channel data or even a deallocated channel.
+This case is guaranteed to deadlock since there are no other threads to supply or consume values needed by the waiting threads.
+Only if a user maintained a separate reference to the blocked threads and manually unblocks them outside the channel could the deadlock be avoid.
+However, without special semantics, this unblocking would generate other runtime errors where the unblocked thread attempts to access non-existing channel data or even a deallocated channel.
 More robust deadlock detection needs to be implemented separate from channels since it requires knowledge about the threading system and other channel/thread state.
 
 \subsection{Program Shutdown}
 Terminating concurrent programs is often one of the most difficult parts of writing concurrent code, particularly if graceful termination is needed.
-The difficulty for graceful termination often arises from the usage of synchronization primitives that need to be handled carefully during shutdown.
+Graceful termination can be difficult to achieve with synchronization primitives that need to be handled carefully during shutdown.
 It is easy to deadlock during termination if threads are left behind on synchronization primitives.
 Additionally, most synchronization primitives are prone to \gls{toctou} issues where there is race between one thread checking the state of a concurrent object and another thread changing the state.
@@ -179,4 +179,5 @@
 For exceptions thrown from @remove@, the buffer element pointer is null.
 For exceptions thrown from @insert@, the element pointer points to the buffer element that the thread attempted to insert.
+Utility routines @bool is_insert( channel_closed & e );@ and @bool is_remove( channel_closed & e );@ are provided for convenient checking of the element pointer.
 This element pointer allows the handler to know which operation failed and also allows the element to not be lost on a failed insert since it can be moved elsewhere in the handler.
 Furthermore, due to \CFA's powerful exception system, this data can be used to choose handlers based on which channel and operation failed.
@@ -288,5 +289,5 @@
 Flag variables are common in Go-channel shutdown-code to avoid panics on a channel, meaning the channel shutdown has to be communicated with threads before it occurs.
 Hence, the two flags @cons_done@ and @prod_done@ are used to communicate with the producers and consumers, respectively.
-Furthermore, producers and consumers need separate shutdown channels so producers terminate before the channel is closed to avoid panicking, and to avoid the case where all the consumers terminate first, which can result in a deadlock for producers if the channel is full.
+Furthermore, producers and consumers need to shutdown separately to ensure that producers terminate before the channel is closed to avoid panicking, and to avoid the case where all the consumers terminate first, which can result in a deadlock for producers if the channel is full.
 The producer flag is set first;
 then after all producers terminate, the consumer flag is set and the channel is closed leaving elements in the buffer.
