pg2k4j icon indicating copy to clipboard operation
pg2k4j copied to clipboard

Blocking Code

Open rkass opened this issue 7 years ago • 1 comments

this sleep could be avoided: https://github.com/disneystreaming/pg2k4j/blob/master/src/main/java/com/disneystreaming/pg2k4j/SlotReaderKinesisWriter.java#L140

One option is instead on continually looping and holding onto the thread it may be possible to instead change the state (i.e. stop retrying) and schedule an async retry which will on success continue normal processing - that way you’re not blocking any threads.

rkass avatar Oct 29 '18 14:10 rkass

Reference in this public OSS repo https://github.com/disneystreaming/pg2k4j/blob/master/src/main/java/com/disneystreaming/pg2k4j/SlotReaderKinesisWriter.java#L140

jwarchol avatar Apr 19 '19 14:04 jwarchol