the underlying mechanism is essentially the select() call