Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On jvm IOApp clean exit, optionally print non-daemon threads #1379

Merged
merged 3 commits into from
Nov 14, 2020

Conversation

Daenyth
Copy link
Contributor

@Daenyth Daenyth commented Nov 2, 2020

Debugging when a jvm is being held open due to non-daemon threads is a royal
pain. Try to help users here (who might not even know this can happen) by
giving the option to debug, which we can put into a FAQ entry

I opted for making it configurable here so that folks who know their app is fine can disable it if they want to avoid us creating a Daemon thread near shutdown time.

@Daenyth
Copy link
Contributor Author

Daenyth commented Nov 5, 2020

@mpilquist Thanks for the feedback. I'll try to get that cleaned up this weekend. Feel free to poke me if I don't ;)

@Daenyth Daenyth marked this pull request as draft November 12, 2020 16:16
@Daenyth Daenyth force-pushed the log-nondaemon branch 2 times, most recently from 222d669 to ab94ad2 Compare November 12, 2020 21:26
@Daenyth Daenyth marked this pull request as ready for review November 12, 2020 21:26
@Daenyth Daenyth requested a review from mpilquist November 12, 2020 21:26
Debugging when a jvm is being held open due to non-daemon threads is a royal
pain. Try to help users here (who might not even know this can happen) by
giving the option to debug, which we can put into a FAQ entry

I opted for making it configurable here since this isn't a problem for most
people, and there's no reason to slow down the shutdown for it unless debugging
@Daenyth
Copy link
Contributor Author

Daenyth commented Nov 12, 2020

The re-push was just the fix the "missing headers" CI failure. No changes aside from that

Meant to do that from the start; accidentally did 1 sec
@Daenyth
Copy link
Contributor Author

Daenyth commented Nov 13, 2020

  • Fixed the sleep time being 1sec; made it 10.
  • How do I do java collection compat across 2.12+2.13? It looks like collections-compat isn't in scope. Should I add it?

https://github.com/typelevel/cats-effect/runs/1393002433#step:14:40

@Daenyth
Copy link
Contributor Author

Daenyth commented Nov 13, 2020

I fixed the collections-compat part.

I think this should be ready for merge now.

I don't think it's a blocker, but I'm wondering how I could possibly write a unit test for this kind of behavior, though. It seems very hard to do. Any suggestions?

@djspiewak djspiewak merged commit 1eb5c15 into typelevel:series/2.x Nov 14, 2020
@djspiewak
Copy link
Member

Merged; thank you!

I don't think it needs unit testing. Probably possible, definitely annoying, limited value. :-)

@Daenyth Daenyth deleted the log-nondaemon branch November 21, 2020 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants