kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Infinite loop in stream #32

Closed ghost closed 9 years ago

ghost commented 10 years ago

I call i2c::stream (https://github.com/kelly/node-i2c/blob/master/lib/i2c.coffee#L62). I expect it to be asynchronous, but it blocks thread. As I can see, it calls wire::readBlock with non-null delay (https://github.com/kelly/node-i2c/blob/master/src/i2c.cc#L121). So it enters while-loop and never exits. I tried, but I can't see any other thread start. What am I doing wrong? Have you ever realy tested i2c::stream?

kelly commented 9 years ago

fixed in main branch.

ghost commented 9 years ago

I already rewrited everything in C, but, lol, thanks!