On Tuesday 28 April 2015 01:11:00 ASHOKBABU CHANNA wrote: > Unix I/O is asynchronous by nature or can be made so by setting the > O_NONBLOCK flag. > It is possible only with IP stacks but may not be with other connectivity?s > such as BLE and BT and future transports.
I would argue that such an API is badly designed and you should report to its author so that they make an asynchronous one. For example, BlueZ is accessible via D-Bus, which is asynchronous. Any replacement that doesn't have the same capabilities is, by comparison, a worse API and that alone should be enough reason for the maintainers to improve upon their design. I do understand your point that we may have to deal with those APIs. Still, the price of the overhead of having threads at all should only be paid by the users who chose OSes that have poor API choices. Those who chose OSes with asynchronous APIs should not be asked to pay the price. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
