The war was well on the way.
The Nazis had allied with Italy and Japan, who was encroaching on the USSR on its'eastern border tying up their army. The signing to split Poland was a delaying tactic that benefited both the USSR and the Nazis.
It would have worked out for Stalin, except for one thing, France falling in six weeks, which kept the German and British armies intact. Stalin counted on a western war bleeding the French, German and British armies dry, making it easy pickings for the Red Army, by as early as 1943.