-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
17 lines (16 loc) · 960 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Package workqueue provides a simple queue that supports the following
features:
* Fair: items processed in the order in which they are added.
* Stingy: a single item will not be processed multiple times concurrently,
and if an item is added multiple times before it can be processed, it
will only be processed once.
* Multiple consumers and producers. In particular, it is allowed for an
item to be reenqueued while it is being processed.
* Shutdown notifications.
Package also contains simple Parallelization functions. The functions allow
for parallel processing of certain work; that is, given the input (either as
a slice or through an input chan), the desired number of workers and the
WorkFunc that will be called for each input item, the Parallizer method will
start the worker go routines. Also, supported is a shutdown input chan which
can be used to shutdown the processing before all the work items have been
processed.