testing thread lock for R