Commit Graph

18 Commits

Author SHA1 Message Date
gavrila florin
fa71d7a37a add support for own ids 2022-05-04 00:04:38 +03:00
Paul Cameron
a8f0a04c3d Fix two race conditions in client.Do
* Common race condition is fixed by identifying that Client.respHandler
  can be completely removed since all respHandler operations (get, put
  and invocation) can be moved into the Client.processLoop goroutine,
  meaning that zero locking is required. This race condition resulted
  in a deadlock that was resolved by the response timeout at the
  end of client.Do, returning ErrLostConn

* Rare race condition is fixed by changing responseHandlerMap.get
  to .getAndRemove. This race condition resulted in the innerHandler
  for a new dtJobCreated assigned in client.Do overriding a stale older
  dtJobCreated request, and the newer innerHandler being removed by an
  older dtJobCreated in client.processLoop > client.handleInner. When
  the newer dtJobCreated response was received, the handler for it had
  already been deleted. This was resolved by the response timeout at the
  end of client.Do, returning ErrLostConn
2021-05-02 11:31:19 +10:00
Christoffer Fjellström
99d317427f Add skipping for integration tests when running unit tests
Run integration tests with the -integration flag
2017-09-27 16:42:21 +02:00
Xing Xing
bf25cc1728 a better documents for the client package 2013-12-26 15:28:42 +08:00
Xing Xing
e3f789bc86 fixed nil pointer 2013-09-22 22:02:05 +08:00
Xing Xing
9daac76f67 removed outside dependency 2013-08-30 11:41:18 +08:00
Xing Xing
358c8c4af0 processed ERROR package 2013-08-30 11:20:51 +08:00
Xing Xing
4997e30a77 runabled 0.2 2013-08-29 18:08:05 +08:00
Xing Xing
e5c30068cd 0.2 refactoring begining 2013-08-29 16:51:23 +08:00
mikespook
8e009be940 #14 fixed 2013-04-24 16:58:06 +08:00
mikespook
16a965f52d An infinite loop ... :( 2013-01-23 17:25:38 +08:00
mikespook
f7a84a6587 pool's syntax error fixed 2013-01-18 17:03:45 +08:00
mikespook
c00234ba9a Refactoring the client api 2013-01-15 17:55:44 +08:00
mikespook
dbc06bf540 start refactoring... 2013-01-14 17:59:48 +08:00
mikespook
ab0fc4a6a5 What a mess! -_-! 2013-01-08 17:23:10 +08:00
mikespook
f14964bc81 add timeout to client.Do 2012-05-24 19:21:30 +08:00
mikespook
563af037cb fixed client:Job.Encode
--HG--
branch : 0.1
2012-05-23 15:22:29 +08:00
mikespook
7614c2678a make a new branch, refactoring codes
--HG--
branch : 0.1
rename : gearman/client/client.go => client/client.go
rename : gearman/client/client_test.go => client/client_test.go
rename : gearman/client/clientjob.go => client/job.go
rename : gearman/gearman.go => common/gearman.go
rename : gearman/worker/jobagent.go => worker/jobagent.go
rename : gearman/worker/worker.go => worker/worker.go
rename : gearman/worker/worker_test.go => worker/worker_test.go
rename : gearman/worker/workerjob.go => worker/workerjob.go
2012-05-22 20:05:39 +08:00