kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinite loop in stream

opened this issue · comments

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?

fixed in main branch.

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