add main_loop_poll interface