ccwienk / temper

Simple python for accessing TEMPer USB thermometers
MIT License
35 stars 27 forks source link

[Testers Needed] Using non blocking I/O #5

Open barry-scott opened 3 years ago

barry-scott commented 3 years ago

I have been looking at the code and noticed that its was using select is an odd way. The oddity is that the fd is not set O_NONBLOCK.

The end result of using O_NONBLOCK is that the code will report the temperatures as soon the sensor reports them. Takes 0.386s vs the old code taking 0.558s. Tested with a TEMPer2.

If you are interest in my refactors let me know and I will raise a PR.

My refactor is in https://github.com/barry-scott/temper/commit/772d8c0aa6791d7dbb1c85c25d2bfcf0aa9e4a0d.

Testers Needed

Tests Passing

eode commented 2 years ago

I am interested in this, but I'll need some testers with the different devices. I have one of the devices, and many of them are pretty finicky.

I don't have to have full coverage of all devices here -- this is entirely volunteer-driven, and it might be hard to get volunteers with all devices. But a decent majority without issues would work for me.

Can you open up a PR for this?

neofob commented 1 year ago

@eode : You should open a PR for this.

eode commented 1 year ago

@neofob you're welcome to open a PR for this.

PRs I'll accept:

or