Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idelvall/kill-test
Simple java test for handling kill unix signals and interrupting threads
https://github.com/idelvall/kill-test
Last synced: 27 days ago
JSON representation
Simple java test for handling kill unix signals and interrupting threads
- Host: GitHub
- URL: https://github.com/idelvall/kill-test
- Owner: idelvall
- Created: 2015-11-18T11:24:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-18T11:36:29.000Z (almost 9 years ago)
- Last Synced: 2023-02-28T18:40:59.149Z (over 1 year ago)
- Language: Java
- Size: 1.95 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kill-test
A test about dealing with UNIX kill signals and interrupting threadsRunning:
```
java -jar kill-test-1.0.0-SNAPSHOT.jar
```Ctrl+C:
```
Running 'non-blocking'
Running 'blocking'
^CInterrupting threads
Interrupting 'class org.brutusin.kill.KillTest$2' termination
Interrupting 'class org.brutusin.kill.KillTest$3' termination
Waiting 'non-blocking' termination
Thread 'blocking' interrupted
Checking interrupted
Thread 'non-blocking' interrupted
Shutdown finished
```[StackOverFlow](http://stackoverflow.com/questions/2541597/how-to-gracefully-handle-the-sigkill-signal-in-java/33778483#33778483)