Re: asio and kqueue (2nd trye) (was: RE: (boost::)asio and kqueue problem)

2016-10-14 Thread Scott Mitchell
Patch generally lgtm ... just 1 nit comment: + } else { + if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat) + return 1; + } Collapse the else and the block inside to just make it an `else if` for less branching. On

Re: asio and kqueue (2nd trye) (was: RE: (boost::)asio and kqueue problem)

2016-10-14 Thread Konstantin Belousov
On Fri, Oct 14, 2016 at 09:21:52AM +, hartmut.bra...@dlr.de wrote: > Hi all, > > here is the 2nd try taking into account the comments I received. Since I'm > not familiar with the locking in the sockets area I ask somebody with that > knowledge to check it before I commit it. I have only st

asio and kqueue (2nd trye) (was: RE: (boost::)asio and kqueue problem)

2016-10-14 Thread Hartmut.Brandt
riday, October 14, 2016 2:16 AM To: freebsd-current@freebsd.org Cc: sepher...@gmail.com; kostik...@gmail.com; Brandt, Hartmut; adrian.ch...@gmail.com Subject: (boost::)asio and kqueue problem I am not using boost but I have also encountered this unexpected behavior when calling listen after kevent. Is

RE: (boost::)asio and kqueue problem

2016-10-14 Thread Hartmut.Brandt
...@gmail.com; Brandt, Hartmut; adrian.ch...@gmail.com Subject: (boost::)asio and kqueue problem I am not using boost but I have also encountered this unexpected behavior when calling listen after kevent. Is their any update on the approach to merge filt_soread and filt_solisten? FYI - MacOS does not

(boost::)asio and kqueue problem

2016-10-13 Thread Scott Mitchell
I am not using boost but I have also encountered this unexpected behavior when calling listen after kevent. Is their any update on the approach to merge filt_soread and filt_solisten? FYI - MacOS does not have this unexpected behavior. Read events are not "missed" if the listen is done after the k

Re: (boost::)asio and kqueue problem

2016-07-19 Thread Sepherosa Ziehau
On Wed, Jul 20, 2016 at 12:38 PM, Konstantin Belousov wrote: > On Tue, Jul 19, 2016 at 05:35:59PM +0200, Hartmut Brandt wrote: >> Hi, >> >> I'm trying to use asio (that's boost::asio without boost) to handle >> listening sockets asynchronuosly. This appears not to work. There are also >> some repo

Re: (boost::)asio and kqueue problem

2016-07-19 Thread Slawa Olhovchenkov
On Wed, Jul 20, 2016 at 07:38:09AM +0300, Konstantin Belousov wrote: > On Tue, Jul 19, 2016 at 05:35:59PM +0200, Hartmut Brandt wrote: > > Hi, > > > > I'm trying to use asio (that's boost::asio without boost) to handle > > listening sockets asynchronuosly. This appears not to work. There are als

Re: (boost::)asio and kqueue problem

2016-07-19 Thread Konstantin Belousov
On Tue, Jul 19, 2016 at 05:35:59PM +0200, Hartmut Brandt wrote: > Hi, > > I'm trying to use asio (that's boost::asio without boost) to handle > listening sockets asynchronuosly. This appears not to work. There are also > some reports on the net about this problem. I was able to reproduce the > p

Re: (boost::)asio and kqueue problem

2016-07-19 Thread Adrian Chadd
heh, nice catch. Would you please file a PR so we don't forget? Thanks! -a On 19 July 2016 at 08:35, Hartmut Brandt wrote: > Hi, > > I'm trying to use asio (that's boost::asio without boost) to handle > listening sockets asynchronuosly. This appears not to work. There are also > some reports

(boost::)asio and kqueue problem

2016-07-19 Thread Hartmut Brandt
Hi, I'm trying to use asio (that's boost::asio without boost) to handle listening sockets asynchronuosly. This appears not to work. There are also some reports on the net about this problem. I was able to reproduce the problem with a small C-programm that does the same steps as asio. The relev