fix deadlock during join while map load happens. fixes #2530 , #3033

Is it possible to replace sleep with a more reliable alternative?