mirror of https://github.com/panjf2000/ants.git
add the usage of integrating with http server
This commit is contained in:
commit
8ce12665cd
|
@ -121,7 +121,7 @@ func main() {
|
|||
pool, _ := ants.NewPoolWithFunc(100, func(payload interface{}) {
|
||||
request, ok := payload.(Request)
|
||||
if !ok {
|
||||
request = Request{Result: make(chan []byte)}
|
||||
request = Request{Param:[]byte(""), Result: make(chan []byte)}
|
||||
}
|
||||
reverseParam := func(s []byte) []byte {
|
||||
for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
|
||||
|
|
|
@ -120,7 +120,7 @@ func main() {
|
|||
pool, _ := ants.NewPoolWithFunc(100, func(payload interface{}) {
|
||||
request, ok := payload.(Request)
|
||||
if !ok {
|
||||
request = Request{Result: make(chan []byte)}
|
||||
request = Request{Param:[]byte(""), Result: make(chan []byte)}
|
||||
}
|
||||
reverseParam := func(s []byte) []byte {
|
||||
for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
|
||||
|
|
|
@ -16,7 +16,7 @@ func main() {
|
|||
pool, _ := ants.NewPoolWithFunc(100, func(payload interface{}) {
|
||||
request, ok := payload.(Request)
|
||||
if !ok {
|
||||
request = Request{Result: make(chan []byte)}
|
||||
request = Request{Param:[]byte(""), Result: make(chan []byte)}
|
||||
}
|
||||
reverseParam := func(s []byte) []byte {
|
||||
for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
|
||||
|
|
Loading…
Reference in New Issue