That's comforting (and simplifies my code, of course). But then what's different from IOCP (completion based) to UNIX-like systems? I think the
alloc_cb(handle1); alloc_cb(handle2); read_cb(handle1); read_cb(handle2); case can equally well happen under UNIX, no? I mean, when you have many sockets sending you data, it seems to me that this should be able to happen. Not that it's relevant to my use-case as I only have one read handle. But it might be good to know for the future (I'll be using more handles). I guess me question is: what's the pathological IOCP case that's "unexpected"? Thanks for the answers, and kind regards! (I really hope this ends up on the mailing list this time, I'm just pressing the double-arrow icon, what should I press instead?) Am Dienstag, 3. Juni 2014 18:13:33 UTC+2 schrieb Bert Belder: > > > > From browsing the internet I got the impression that this sequence of > events > > > is possible: > > > > > > alloc_cb(); > > > alloc_cb(); > > > read_cb(); > > > read_cb(); > > That's possible although it would be for different handles. > > E.g. this could happen: > > > > alloc_cb(handle1); > > > alloc_cb(handle2); > > > read_cb(handle1); > > > read_cb(handle2); > > But this isn't: > > > > alloc_cb(handle1); > > > alloc_cb(handle1); > > > read_cb(handle1); > > > read_cb(handle1); > > - Bert > > > -----Original Message----- > > From: [email protected] <javascript:> [mailto: > [email protected] <javascript:>] On Behalf > > Of Iñaki Baz Castillo > > Sent: Tuesday, June 03, 2014 5:46 PM > > To: [email protected] <javascript:> > > Subject: Re: [libuv] interleaved alloc_cb/read_cb, is the libuv test > wrong or did I > > misunderstand? > > > > 2014-06-03 17:42 GMT+02:00 Nicolas Hillegeer <[email protected] > <javascript:>>: > > > From browsing the internet I got the impression that this sequence of > events > > > is possible: > > > > > > alloc_cb(); > > > alloc_cb(); > > > read_cb(); > > > read_cb(); > > > > Never seen that under Linux and OSX when using libuv TCP and PIPE > handles. > > > > > > -- > > Iñaki Baz Castillo > > <[email protected] <javascript:>> > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "libuv" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email > > to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at http://groups.google.com/group/libuv. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
