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 (close #297) #298

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

For issue #297. A fix for issue #291 / PR #293.

The threads in the ScheduledThreadPool ExecutorService in the Tracker can now be stopped. This was causing the simple-console demo to hang.

The new method tracker.close() shuts down the Tracker threadpool, and also calls the BatchEmitter method emitter.close(), which interrupts the Emitter threads.