making event library non-blocking