call when_interested function and add assert to prevent locking of pointers
only poll when buffer has space to read or write