improved event queue
optimizations
rwlock is not really a good idea because of its overhead