comparison py/sensor_ds18b20.py @ 556:c5f8375b12a2

long polling works
author Matt Johnston <matt@ucc.asn.au>
date Tue, 09 Jun 2015 23:27:44 +0800
parents 3a514fbb88eb
children 20c89630be6c
comparison
equal deleted inserted replaced
555:9dea75bd765f 556:c5f8375b12a2
33 33
34 @asyncio.coroutine 34 @asyncio.coroutine
35 def run(self): 35 def run(self):
36 while True: 36 while True:
37 yield from self.do() 37 yield from self.do()
38 yield from self.server.sleep(config.SENSOR_SLEEP) 38 yield from asyncio.sleep(config.SENSOR_SLEEP)
39 39
40 40
41 @asyncio.coroutine 41 @asyncio.coroutine
42 def read_wait(self, f): 42 def read_wait(self, f):
43 # handles a blocking file read with a threadpool. A 43 # handles a blocking file read with a threadpool. A