Professor Zweigenhaft added that chief executives typically don’t have the personality of civil rights trail blazers. “The kind of person who becomes a C.E.O. isn’t going to surprise the board by coming out in The New York Times,” he said.

Although women and blacks are more visible, they face similar pressures in the executive suite. “Corporate boards tend to be older, white, male and conservative, and they want C.E.O.s they feel comfortable with,” Professor Zweigenhaft said. “Women who make it to the top need to show they can be one of the guys. African-Americans can’t seem threatening. You’re not going to find Jesse Jackson on any Fortune 500 boards.”

Mr. Browne says it was his efforts to conform to the homophobia he confronted — “my overwhelming desire to conceal my sexual orientation,” as he puts it — that led to his undoing. Like anyone leading a secret life, he was vulnerable to blackmail, and his former lover, a 23-year-old escort he’d met via the Internet, sold his story to a tabloid after their relationship ended and Mr. Browne stopped sending him money.

“My greatest regret in life is that I wasn’t honest while I was chief executive,” he told me recently over coffee in New York, where he was promoting his book. “I led a great company for many years, and not to let people see who I was, was a big error. People need to see role models. I could have left BP in a very different way.”

Still, he acknowledged that he probably never would have publicly admitted that he was gay had he not been forced to. “I was very well practiced at leading two lives,” he said. “I’d convinced myself the downside was far worse than the upside. And I was reserved by nature. We’re not the types to wear our hearts on our sleeves.”

Like many people of his generation (he is 66), to admit being gay seemed unthinkable during his formative years. When he was at Cambridge University, homosexual acts were a crime, homosexuality was deemed a mental illness and gay people were subject to bullying and blackmail. He never told his mother he was gay, even though she lived with him before she died. She was a Romanian Jew who had been betrayed to the Nazis and survived internment at Auschwitz. She conveyed the sense that “I should never reveal a secret — it will be used against you,” he said. He was acutely aware that gays were also victims of the Holocaust. And being gay was taboo in the nearly all-male outposts in Alaska and the North Sea, where he worked for BP.

Like Mr. Browne, “the average age of a C.E.O. is somewhere in the 50s or 60s,” said Todd Sears, the founder of Out on the Street. “When they started their careers, being gay was considered a disease, it was illegal and it was absolutely career-ending. Being in the closet at work has been a way of life for these people for 30 years.” But he thinks this may change. “There are a significant number of younger openly gay people one or two levels down from the top who are likely to be C.E.O.s within a few years,” he said.