mikespook/gearman-go

在大量的提交时,会出现map并发写错误

JessonChan opened this issue · 1 comments

示例代码

package main

import (
    "fmt"
    "os"

    "github.com/mikespook/gearman-go/client"
)

func main() {
    for j := 0; j < 100; j++ {
        cl, _ := client.New("tcp", os.Args[1])
        for i := 0; i < 1000; i++ {
            _, e := cl.DoBg("title", []byte("normal"), client.JobNormal)
            if e != nil {
                fmt.Println(e)
            }
        }
    }
}

go run file.go 127.0.0.1:4730

image

@mikespook I have fix this #70