reduce CPU usage in while loop -


how limit cpu of while loop? (cpu usage 100%)

in case, code inside while loop:

 sub start()      listenerthread = new thread(addressof listen)     listenerthread.isbackground = true     listenerthread.start() end sub  enter code here   sub listen()     try         listener = new tcplistener(new ipendpoint(ipaddress.any, port))          listener.start()      a:          while (true)             thread.sleep(600)             dim c new connection(listener.accepttcpclient)             addhandler c.gotinfo, addressof gotinfo             addhandler c.disconnected, addressof disconnected         end while     catch ex exception         goto     end try   end sub 


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -