avoid thread locks