News for hackers. Stuff that matters.
Re:Why not C++? by stefs on Saturday March 05, 2016 @02:54PM (#11230752)
i think this is strange. i'm not a c++ programmer, but the evented frameworks (node.js or vert.x) are doing it the other way round: use threads only for IO (or computation so heavy it's practically blocking). the complete opposite.
Re:Why not C++? by misframer on Saturday March 05, 2016 @03:00PM (#11230779)
libuv (used by Node.js) uses epoll, kqueue, etc. for network I/O. It uses a thread pool for all file operations.
Re:Why not C++? by stefs on Sunday March 06, 2016 @08:56PM (#11236610)
ah, well - when reading "blocking io" i first thought about the file system. so does my point still stand? using a threadpool for disk IO does go against "threads should only be used to exercise multiple CPU cores and never as a way to work around blocking IO."

or am i still not getting this?

Re:Why not C++? by jcoffland on Saturday March 05, 2016 @03:02PM (#11230797)
Actually node.js does it the same way. Under the covers node.js handles IO with libev which is an event library.
Re:Why not C++? by misframer on Saturday March 05, 2016 @03:04PM (#11230805)
They use libuv now.