Add pthread mutex to event subscribe get state