This discussion makes me wonder, how hard would it be to reimplement Gem in a separate thread to avoid all these ugly workarounds just like pidip (or was that pdp?) has an option of running in a separate thread?