Is it bad practice to use Thread.yield() when busy-looping?

后端 未结 0 1975
北荒
北荒 2021-02-13 13:29

I have a thread busy-looping until my ServerSocket object binds to a port before doing any read/write operation.

new Thread(() -> {
    while (!se         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题