psgi plugin was badly broken in async mode when threads are enabled