dispatch version 0.1_02
Package dispatch provides goroutine dispatch and concurrency limiting
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
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
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 -
Use godoc to vew the documentation for dispatch
Or alternatively, use a godoc http server
Then, visit the following URLs for complete dispatch documentation
Bryan Matsuo firstname.lastname@example.org
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.