You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/26 10:48:14 UTC

[GitHub] [rocketmq] foxeatsspicy commented on issue #4902: 把循环index的类型由long改为int,让循环前放置Safepoint,效果会不会比Thread.sleep(0)更好?

foxeatsspicy commented on issue #4902:
URL: https://github.com/apache/rocketmq/issues/4902#issuecomment-1228346086

   > 虽然是sleep 0,但因操作系统时钟精度原因,实际会sleep 几毫秒,不同的系统,精度可能值会不一样; 删除之后,就没有sleep的效果了;
   
   请问为什么要有sleep的效果呢?没有sleep的效果不是更好吗?
   另外还有的问题是,如果追求sleep的效果,sleep(0)有没有可能被jit优化啊?
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org