soyuka / pidusage

Cross-platform process cpu % and memory usage of a PID
MIT License
512 stars 55 forks source link

Unref history interval #107

Closed Hornwitser closed 4 years ago

Hornwitser commented 4 years ago

Call unref() on the interval created by lib/history.js so that it does not prevent the event loop for exiting. Relieves the need to call pidusage.clear() before exiting in applications using the library.

This is a simpler alternative to #106.

soyuka commented 4 years ago

This would be sufficient indeed, I like the solution. Thanks!