title: TimeLimiter is not stopping the method execution and going to next step
body: <p>Currently, we are facing an issue with a read timeout for a DB call. I am trying to add a time limit on the method to wait for only 3 seconds. If the method doesn't return data in 3 seconds my execution goes to the next line. I tried to achieve this with the below code but the control is not moving to the next step even after 3 seconds. In the below code I am adding a timeout for method b execution, When method b takes more than 3 seconds to return the control should go to catch block and go to the next line of code i.e. callingMethodC. But the control is not coming out even after 3 seconds am I missing anything? Can anyone suggest?</p>
  <pre><code>private String methodA(){
  TimeLimiter timeLimiter = new SimpleTimeLimiter();
                      try {
                      String  data = timeLimiter.callWithTimeout(
                                  () -&gt; methodB(&quot;abc&quot;), 3, TimeUnit.SECONDS, true);
                      } catch (Exception e) {
                          log.error(&quot;Exception while read data from db after 3 seconds&quot;);
                      }
  callmethodc();
  }
  
  private String methodB(String abc){
  String result = dbrepository.get(abc);
  return result;
  }
  </code></pre>