Skip to content

Arvinderpal/workqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. 

About

A simple work queue

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages