Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Go, time.Sleep don't hold the thread. That's the cool part. In Go a noop gives the control back to the scheduler which will then reuse the thread for any goroutine that needs cpu -- ie. one that isnt noop-ing. So if you sleep or wait for 10 seconds, 10 seconds of cpu will be given to other goroutines.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: