EXPERIMENTAL: tevent_kqueue support

Stefan (metze) Metzmacher metze at samba.org
Tue Feb 26 23:02:43 MST 2013


Am 26.02.2013 22:44, schrieb Jeremy Allison:
> On Tue, Feb 26, 2013 at 01:35:58PM -0800, Jeremy Allison wrote:
>>
>> That code was already written carefully to do exactly what
>> it does :-).
>>
>> Without using threads it's really easy to get yourself
>> blocked on a pipe. I'll have to do more testing to see
>> if it's true that writable is cleared when a pipe is
>> full.
> 
> Yep. Just confirmed with junk code. poll returns
> writable on a pipe fd even if writing to such a
> pipe would block.
> 
> That means that for this test we can't always
> prioritize writes over reads, as we just end
> up blocked in the callback. That's why the
> callback code is written as it is, I'm
> assuming a pipe can hold 256 btyes without
> blocking.

If we get POLLOUT without being able to write 1 byte
without blocking, we have a problem.
That's the whole point of having POLLOUT at all...

Can you post your junkcode example?

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130227/e5c0ba56/attachment.pgp>


More information about the samba-technical mailing list