lostluck commented on pull request #16943: URL: https://github.com/apache/beam/pull/16943#issuecomment-1050307154
> There are a lot of things that just wind up being mutex-guarded wrappers around other types and not doing much else, which is fine so long as we trust that golang mutexes actually work correctly. It just also makes test cases around these things unnecessary or, in this case, extremely simple. Eventually I'd like to not have stuff like this kicking around but for the time being it's here +1 This is a simple enough usage, we don't need to also test the mutex. If things were a few degrees removed, and we were wrangling multiple goroutines, we'd be testing scenarios like this wrapper intends to ensure. Eg - complicated situation, but we have multiple errors, ensure the first error which we know by construction is returned. This package, like stringx is largely a bit of premature optimization, since it's very easy to implement in place. But we do actually use this one IIRC. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
