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

Threading of sensor reads #41

Closed
bsimmo opened this issue Oct 6, 2017 · 4 comments
Closed

Threading of sensor reads #41

bsimmo opened this issue Oct 6, 2017 · 4 comments

Comments

@bsimmo
Copy link

bsimmo commented Oct 6, 2017

As far as I can tell, from use, you access each sensor sequencially.
Would it be possible to implement threading to access them concurrently, this would speed up reading taking for more than one sensor.

I assume people would want to be able to disable the use of threads for whatever reason.

I've had a search and found this that may or may not give an idea.
https://gist.github.com/RobThree/c6b9a5dc16357eeb0e011d3ed9a281b0

@timofurrer
Copy link
Owner

As far as I can tell, from use, you access each sensor sequencially.

That's right. The w1thermsensor module does not interact with anything related to threading.

Would it be possible to implement threading to access them concurrently

You can certainly do that. There should be nothing in the code which would restrict it for single-threaded use.

I'm not sure what you want exactly. Can you provide an example of something you want to achieve but doesn't work for you? That would help me to understand what you actually want to achieve :)

@bsimmo
Copy link
Author

bsimmo commented Oct 6, 2017 via email

@timofurrer
Copy link
Owner

timofurrer commented Oct 6, 2017

Okay, I think I've got what you try to achieve.
However, I want w1thermsensor to be as simple as possible and therefore want to omit every kind of threading by default.

If you want multiple sensors to be read in parallel you can write a little wrapper around w1thermsensor.

I'm going to close this issue since multi-threading is definitely not in the scope of this project.

Thank you anyways 🍻

@bsimmo
Copy link
Author

bsimmo commented Oct 8, 2017

No problem, I guess i'll clone and try work it out myself :-)

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

No branches or pull requests

2 participants