diff options
author | Wolfy-J <[email protected]> | 2018-01-23 20:00:15 -0500 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-01-23 20:00:15 -0500 |
commit | 2fa64cef5bc8f05b3185460aafddfd8ecc7d16a2 (patch) | |
tree | 5a98a190c9d470367e5be3adb5977df2627be611 /README.md | |
parent | af36e5c30cdb538da352591d37e469e5fc1f7d5f (diff) |
example
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -19,6 +19,24 @@ Features: - very fast (~200k calls per second on Ryzen 1700X over 17 threads) - works on Windows +Examples: +-------- + +```go +pool, err := NewPool( + func() *exec.Cmd { return exec.Command("php", "worker.php") }, + NewPipeFactory(), + Config{ + NumWorkers: uint64(runtime.NumCPU()), + AllocateTimeout: time.Second, + DestroyTimeout: time.Second, + }, +) +defer p.Destroy() + +rsp, err := p.Exec(&Payload{Body: []byte("hello")}) +``` + License: -------- The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.
\ No newline at end of file |