loc: use a mutex to sync the engine and field events