symphonyoss / symphony-java-client

Java client library for Symphony
Apache License 2.0
34 stars 37 forks source link

Non-daemon thread somewhere #85

Closed pmonks closed 6 years ago

pmonks commented 6 years ago

Somewhere in SJC (since at least v1.0.2) a thread is being created that's not a daemon thread (I suspect it's the thread that handles the data feed, but I haven't verified this). As a result the JVM won't terminate when the default main thread terminates, leaving bot processes hanging.

ftbb commented 6 years ago

It is the DataFeedWorker (in 1.0.2 version MessageFeedWorker) thread.

You have to call SymphonyClient.shutdown() to terminate.

Will look into handling this more gracefully..

pmonks commented 6 years ago

Would it make sense to set the thread to be a daemon? Or does that leak resources somewhere?

DovOps commented 6 years ago

In addition to the problems with deamon-ness, is simply identifying the thread. I've submitted PR #88 to address the latter issue so we have a better understanding of SymClient-spawned threads.

ftbb commented 6 years ago

Thanks @dovie. Also added to new PresenceWorker..

Going to close this, but happy to reopen if we are seeing issues.