Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Client threads - can they be daemon threads?

A little background:

The older clients in SolrJ use the Apache HttpClient, version 4.5.x.

The newer clients in SolrJ use the Jetty HttpClient, currently version 10.0.13.

If I use the older client, I can exit the program without closing the SolrClient.

If I try this with the newer client, the program never exits, because of threads started by the Jetty client.

I am reasonably certain that the Apache client probably also creates threads, but if that is the case, I believe those threads are marked as Daemon threads so they do not interfere with the JVM shutting down.

Would a request to have the Jetty client's threads marked as daemon be taken seriously? Would I create that feature request on github?

I am well aware that proper resource handling says "close anything you open" ... which completely makes sense for long-running programs that don't utilize the same client for the life of the program. But for something quick and dirty, I often rely on the simple fact that the JVM is shutting down instead of explicitly closing resources.

Thanks,
Shawn



Back to the top