Prevent multiple thread writes