Add a flag for non-blocking read.

When the read operation blocks, the GLIB event loop also stops and
other event handlers cannot be called..