vmware-go-kcl-v2/clientlibrary
dferstay a35f4960a8 Make Worker.Shutdown() synchronous (#58)
Previously, a WaitGroup was used to track executing ShardConsumers
and prevent Worker.Shutdown() from returning until all ShardConsumers
had completed.  Unfortunately, it was possible for Shutdown() to race
with the eventLoop(), leading to a situation where Worker.Shutdown()
returns while a ShardConsumer is still executing.

Now, we increment the WaitGroup to keep track the eventLoop() as well
as the ShardConsumers.  This prevents shutdown from returning until all
background go-routines have completed.

Signed-off-by: Daniel Ferstay <dferstay@splunk.com>
2021-12-20 21:21:15 -06:00
..
checkpoint Make the lease refresh period configurable (#56) 2021-12-20 21:21:15 -06:00
common Expose monitoring service (#49) 2021-12-20 21:21:15 -06:00
config Make the lease refresh period configurable (#56) 2021-12-20 21:21:15 -06:00
interfaces KCL: Update copyright and permission 2021-12-20 21:16:27 -06:00
metrics Fix error in puslishing cloud watch metrics (#55) 2021-12-20 21:21:15 -06:00
partition Add support for providing custom checkpointer (#17) 2021-12-20 21:21:14 -06:00
utils KCL: Fix random number generator 2021-12-20 21:16:38 -06:00
worker Make Worker.Shutdown() synchronous (#58) 2021-12-20 21:21:15 -06:00