cadence-java-client
cadence-java-client copied to clipboard
PollLoopTasks are relying on separate Semaphores to guard polling execution.
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