June 1999
Intermediate to advanced
368 pages
8h 21m
English
We're now going to explore a variant of the channel, in which processes consume messages as they retrieve them. We call this kind of channel a consumer channel. One common use of a consumer channel is to provide a task queue. With a task queue, writers add tasks (requests for services) into the channel and worker processes remove and process the tasks (computing them or providing some other service). Since each task only needs to be processed once, a consumer channel provides a natural way to store the requests. At the same time, it allows requests to be processed in a first-come, first-served manner.
Rather than implement a task queue, we are going to explore consumer channels with ...
Read now
Unlock full access