NeuronRobotics / nrjavaserial

A Java Serial Port system. This is a fork of the RXTX project that uses in jar loading of the native code.
Other
345 stars 143 forks source link

Use named threads #137

Closed wborn closed 5 years ago

wborn commented 5 years ago

It's a bit easier to debug Java issues when the library properly names threads:

Karaf

openhab> threads --list
Id  │ Name                                                                                           │ State         │ CPU time │ Usr time
────┼────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────┼──────────┼─────────
1   │ main                                                                                           │ WAITING       │ 372      │ 320
2   │ Reference Handler                                                                              │ WAITING       │ 11       │ 10
3   │ Finalizer                                                                                      │ WAITING       │ 16       │ 10
5   │ Signal Dispatcher                                                                              │ RUNNABLE      │ 1        │ 0
...
245 │ RXTXPortMonitor(/dev/ttyUSB0)                                                                  │ RUNNABLE      │ 19098    │ 3720

Visual VM

visualvm

Fixes #138

madhephaestus commented 5 years ago

Cool! can you make an issue, associate this PR to the issue? I'd like to merge this in :)

wborn commented 5 years ago

Alright! I've created #138 for this PR. :smile: