fighting with race conditions