kelly / node-i2c

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

asynchronous interface of writeBytes is synchronous #30

Closed seriousManual closed 9 years ago

seriousManual commented 10 years ago

The asynchronous interface of .writeBytes suggests that the control flow is asynchronous but in fact blocks the thread.

This lead to some weird behaviour and some debugging work.

kelly commented 10 years ago

Where do you see that it blocks the thread?

seriousManual commented 10 years ago

thats what i was doing: https://gist.github.com/zaphod1984/10037972

the complete initialization has finished before the event handler could have been bind.

seriousManual commented 9 years ago

thx