If it doesn't work (doesn't solve erratic freezes) we'll have to resort to tougher (Windows-only) measures.
seems to be the cause of the buildbot hangs. Try to fix it, and add some comments.