Channel flags

When we introduced the server (in "The server"), we mentioned that the ChannelCreate() function takes a flags parameter and that we'd just leave it as zero.

Now it's time to explain the flags. We'll examine only a few of the possible flags values:

_NTO_CHF_FIXED_PRIORITY
The receiving thread will not change priority based on the priority of the sender. (We talk more about priority issues in the "Priority inheritance" section, below). Ordinarily (i.e., if you don't specify this flag), the receiving thread's priority is changed to that of the sender.
_NTO_CHF_UNBLOCK
The kernel delivers a pulse whenever a client thread attempts to unblock. The server must reply to the client in order to allow the client to unblock. We'll discuss this one below, because it has some very interesting consequences, for both the client and the server.
_NTO_CHF_THREAD_DEATH
The kernel delivers a pulse whenever a thread blocked on this channel dies. This is useful for servers that want to maintain a fixed "pool of threads" available to service requests at all times.
_NTO_CHF_DISCONNECT
The kernel delivers a pulse whenever all connections from a single client have been disconnected from the server.
_NTO_CHF_COID_DISCONNECT
The kernel delivers a pulse whenever any connection owned by this process is terminated due to the channel on the other end going away.