79245850

Date: 2024-12-02 23:12:48
Score: 0.5
Natty:
Report link

You can use

Thread.yeild()

instead of sleep.

If a thread desires to halt its execution to allow an opportunity for the other threads of equal priority, then we should choose the yield method.Because Thread.sleep blocks the main thread.

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: sRumu