Thank you, Thiago, for pointing that out. I will add that many robust, well-written C/C++ programs don't set O_NONBLOCK yet never block, through careful use of select.
John -----Original Message----- From: Macieira, Thiago Sent: Monday, April 27, 2015 5:00 PM To: iotivity-dev at lists.iotivity.org; ashok.channa at samsung.com Cc: Light, John J; Lankswert, Patrick; Keane, Erich Subject: Re: [dev] GLib removal and thread-pool implementation- On Monday 27 April 2015 10:50:23 ASHOKBABU CHANNA wrote: > By just eliminating the threads we might be simplifying the code but > it might cause lot of blocking issues. Multi thread concept itself > derived to eliminate the blocking of I/O operations. That's actually incorrect. It's what a lot of developers learned because I/O in Java is blocking, but it isn't true for other programming languages. Most Unix I/O is asynchronous by nature or can be made so by setting the O_NONBLOCK flag. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
