A while back I asked about the Python OW module, and if it was thread 
safe.  There was never a definitive answer.  So, now my question is, 
after some testing: is it even thread capable?

I have a group of 36 sensors.  I create sensor objects for all of them, 
and then iterate through them and collect a reading.  This takes 
(about) 42 seconds.  I then created a list of getter functions that 
return the sensors' readings. I used the futures module [0] to spin all 
these functions off into their own threads. Futures does this, then 
collects the results.

This still took about 42 seconds.

Reading through the Python module, there doesn't seem to be any kind of 
lock or semaphore preventing simultaneous reads.  Is there such a thing 
at the libow C level?

This is using a USB connection, by the way.

I'd really like some way to speed up readings. Caching *might* be one 
way, but I'll have to see if the delay in updates is acceptable.

[0] http://code.google.com/p/pythonfutures/

j

-- 
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
jos...@azariah.com - Jabber: pedah...@gmail.com
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to