Added thread to process glib events

Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>