Created: 2011-07-07 02:47
Updated: 2017-12-31 12:59
License: bsd-2-clause


dispatch version 0.1_02

Package dispatch provides goroutine dispatch and concurrency limiting

About dispatch

Package dispatch provides an object Dispatch which is a queueing system for concurrent functions. It implements a dynamic limit on the number of routines it is runs simultaneously. It also implements an interface Queue, allowing for alternate queue implementations.


Generally, you run concurrent processes for increased program speed. So, you would like a dispatch method to be fast. However, the general purpose nature of the dispatch package causes some necessary bloating underlying the methods of Dispatch objects. For concurrent tasks which are doing actual work for more than a few hundred nanoseconds, this should not be very noticeable.

Hovever, if you have very high performance expectations, you may be better off writing your own lean and mean goroutine dispatcher that is suited for your individual purposes.


You must have Go installed (http://golang.org/).



Use goinstall to install dispatch

goinstall github.com/bmatsuo/dispatch


You can usage examples by checking out the examples subdirectory. You can run the compile all the examples to run the locally with the command

cd $GOROOT/src/pkg/github.com/bmatsuo/dispatch && gomake exinstall && cd -

This installs all the examples. So, you can for instance run godu simply with the command


When you are done, remove the examples with the command

cd $GOROOT/src/pkg/github.com/bmatsuo/dispatch && gomake exnuke && cd -

General Documentation

Use godoc to vew the documentation for dispatch

godoc github.com/bmatsuo/dispatch

Or alternatively, use a godoc http server

godoc -http=:6060

Then, visit the following URLs for complete dispatch documentation


Bryan Matsuo bmatsuo@soe.ucsc.edu

Copyright & License

Copyright (c) 2011, Bryan Matsuo. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more