forked from yuxh/gearman-go
Merge pull request #75 from No-ops/patch-1
Add sync lock to create job functions
This commit is contained in:
commit
9735b2e54f
@ -221,6 +221,8 @@ func (client *Client) do(funcname string, data []byte,
|
||||
return "", ErrLostConn
|
||||
}
|
||||
var result = make(chan handleOrError, 1)
|
||||
client.Lock()
|
||||
defer client.Unlock()
|
||||
client.lastcall = "c"
|
||||
client.innerHandler.put("c", func(resp *Response) {
|
||||
if resp.DataType == dtError {
|
||||
|
Loading…
Reference in New Issue
Block a user