Won't this busy-loop in filter.c if it keeps returning EAGAIN for longer periods of time/forever? The whole API really isn't prepared for non-blocking operations, so I'm not sure this is a good idea.