Thanks again, guys, for all the kind words.
Nigel's right that, in Britain, the 30s and 40s were far from a bad time to be gay. I think he's wrong, though, in dating the start of the real persecution to the late 50s and even 60s. I would put it in 1952-3 under (no coincidence?) the new Tory government. Sir David Maxwell-Fyfe, who described gays as "a plague over England", was Home Secretary. As commissioner of the Metropolitan Police, he appointed Sir John Nott-Bower who swore to "rip the cover off all London filth spots" and brought other police forces into line. All this, it seems, was with encouragement, even advice, from America which was in the grip of McCarthyism.
The immediate result was the "great purge" as it was known - a witch-hunt which caught, as well as countless lesser-known victims, many big figures. Burgess and Maclean have already been mentioned above, as have Turing and Gielgud. There was an MP whose name escapes me who was forced to resign, and - most famous of all at the time - Lord Montagu. By 1960 thousands were in gaol. Yet the vendetta was not in tune with public opinion at large. The first time Gielgud appeared on stage after his conviction, he got a standing ovation. When Montagu and his co-defendants were removed from the courthouse after being sentenced, the large crowd waiting outside, which the authorities thought would attack them, cheered them instead.
But all that was later. Back in the 30s Hodge and Jack in Habakkuk's Mill, and during the war Charlie and Doug in Their Finest Hour, would have few problems provided they were not too blatant.