But now you've just implemented thread context switching by pulling it's implementation details into your algorithm... Just use a language that supports threading if you have real work to do...
It really depends on what your most important metric is. If the most important metric is speed then having more control over context switching is often better.