[PATCH 5/8] server: Use an event as thread context sync.