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

C# has Task.FromResult(), which is useful if you are implementing an interface that allows async work but your implementation doesn't require it. I believe the runtime will check for this case and continue execution. It's better for the cache to keep executing the current task on the current thread.

I don't really understand gp's point. From inside the code, you can't tell if there was a pause or not. Clock time or thread id are heuristics, but you can't really be sure.

 help



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

Search: