Improved dataqueue thread safety