snowplow / snowplow-java-tracker

Snowplow event tracker for Java. Add analytics to your Java desktop and server apps, servlets and games. (See also: snowplow-android-tracker)
http://snowplowanalytics.com
Apache License 2.0
24 stars 36 forks source link

Enable shutdown of Tracker threads #297

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

In issue #291, the Tracker class got its own ScheduledThreadPool for processing Events into TrackerPayloads, and passing them to the Emitter.

Threads in ScheduledThreadPools don't terminate when they've finished their task. They must be stopped manually. The Emitter class already has a method, close(), for handling ExecutorService shutdown. The Tracker now also needs a method to do the same.