Ideally you don't ever block if you have work to do.  In general, as long as you can do work you should be doing work.  It's when you cannot do any work that you want to yield control to the event loop.  That's usually when you're waiting for I/O from somewhere. That said, if the work you can do is going to take along time without having any sort of natural blocking point (I/O) but you don't want to block your other tasks for that long then you need to start trying to find ways you can brea