Thread restrictions and write tests