tian-pengfei opened a new issue, #4228:
URL: https://github.com/apache/shenyu/issues/4228

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   Added this code in RandomIntGenerator#generate
   
![image](https://user-images.githubusercontent.com/42602026/204699970-6b7a7f49-a2b4-496e-a29f-5c88d5c49ade.png)
   
   
   add test
   ```java
    @Test
       public void threadSafeTest() throws InterruptedException {
           new Thread(() -> 
System.out.println(GeneratorFactory.dealRule("${int|10-15}"))).start();
           new Thread(() -> 
System.out.println(GeneratorFactory.dealRule("${int|16-20}"))).start();
           Thread.sleep(3000);
       }
   ```
   
   output
   ```tex
   18
   20
   ```
   
   
   ### Expected Behavior
   
   it should be safe in multithreading
   
   ### Steps To Reproduce
   
   _No response_
   
   ### Environment
   
   ```markdown
   ShenYu version(s):
   ```
   
   
   ### Debug logs
   
   _No response_
   
   ### Anything else?
   
   _No response_


-- 
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]

Reply via email to