def METHOD_NAME(fd, event):
    """Sets event when data becomes available to read on fd."""
    sel = selectors.DefaultSelector()
    sel.register(fd, selectors.EVENT_READ)
    try:
        while True:
            sel.select()
            event.set()
    except gevent.GreenletExit:
        sel.unregister(fd)