Question

I want to use com.google.common.util.concurrent.SimpleTimeLimiter from guava in my server applications.

Can I create a singleton instance of SimpleTimeLimiter for the use in several classes?

Is the call of its method callWithTimeout() thread safe?

Was it helpful?

Solution

Sources of SimpleTimeLimiter looks perfectly thread safe for me. There are actually no place there to break thread safety, while executor you are passing is thread safe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top