[haiku-development] Re: Problems with non-blocking sockets

  • From: Jonathan Schleifer <js-haiku-development@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 11 Jan 2014 01:44:23 +0100

Am 11.01.2014 um 00:30 schrieb Donn Cave <donn@xxxxxxxxxxx>:

> More likely Haiku would add a getaddrinfo_a(), like the GNU library's.

I think getaddrinfo_a would not give you much, as you can't 
select()/poll()/kqueue() on a sigevent and there's no aio_connect AFAIK and. 
This means you would still need two separate threads as you use two different 
kinds of async I/O (fd + select()/poll()/kqueue() vs sigevent). Async 
connecting is pretty broken in POSIX, IMHO.

The only solution would be to write a new async resolver that can use an 
existing select()/poll()/kqueue() call. Because if you need to have two 
select()/poll()/kqueue() calls at the same time, you have earned nothing - 
again.

--
Jonathan


Other related posts: