cadence-java-client icon indicating copy to clipboard operation
cadence-java-client copied to clipboard

PollLoopTasks are relying on separate Semaphores to guard polling execution.

Open siavashcss opened this issue 5 years ago • 0 comments

Passing a distinct PollExecutionTask to each PollLoopTask means that you have pollThreadCount Semaphores with pollThreadCount permits each guarding pollTask.poll(). If the point of the semaphore is to guard against task queue getting full, it won't work. But having pollThreadCount threads only is doing it right now. Wondering if there is any other intention behind using the semaphore.

https://github.com/uber/cadence-java-client/blob/fd79efa19f711bb7bc0676ceb5445d40d4db8a54/src/main/java/com/uber/cadence/internal/worker/Poller.java#L124

siavashcss avatar Jul 08 '20 21:07 siavashcss