Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not really, typically you'd have one thread handling all sendFiles through a single selector over the destination sockets. As a matter of fact, it's actually really painful to do sendFile in Java from a single thread, because when the channel isn't ready for sending, rather than returning EAGAIN and letting you busy-loop or wait/retry or whatever, it throws an exception. So you have to use a selector to do sendfile, and in that case, why not use multiple tasks with the same selector?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: