Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmzeeman/tubby
A process pool for running tasks.
https://github.com/mmzeeman/tubby
Last synced: about 16 hours ago
JSON representation
A process pool for running tasks.
- Host: GitHub
- URL: https://github.com/mmzeeman/tubby
- Owner: mmzeeman
- Created: 2012-12-17T18:02:36.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-20T10:06:15.000Z (over 11 years ago)
- Last Synced: 2024-11-16T06:49:43.930Z (about 2 months ago)
- Language: Erlang
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tubby
=====A process pool for running tasks.
Example
```erlang
tubby:start(my_worker_pool, {my_worker, start_link, []}),%% Start a worker on the pool.
{ok, Pid} = tubby:run(my_worker_pool, [Arg1, Arg2]),
my_worker:do_stuff(Pid, Stuff),%% Queue a worker on the pool. The task will run when there is room
ok = tubby:queue(my_worker_pool, [Arg1, Arg2]),%% Or queue it, and wait for 10000 msecs until there is room.
{ok, Pid} = tubby:queue_wait(my_worker_pool, [Arg1, Arg2], 10000),
```