Nanjiani recalls the moment when he realized he wanted to spend the rest of his life with Emily V. Gordon

At the eight-month mark in their relationship, Kumail Nanjiani knew that he loved his girlfriend, Emily V. Gordon, but he wasn’t 100 percent sure about their future as a couple.

“We were in that phase where you’re like, ‘Is this going to go to the next level?’ ” Nanjiani recalls to PEOPLE. “We were having such a great time. I wasn’t thinking about the future at all. I really, really liked her but my parents didn’t know about her and there was really no plan.”

That’s when fate took a terrifying turn and Gordon, who had been feeling feverish and had trouble breathing, was admitted to the hospital and mere hours later put into a medically induced coma.

“I was the first person at the hospital and they made me sign the paperwork,” says the Silicon Valley star. “I realized it was much more serious when the doctor said we’re going put her in a coma. That was my first clue that this wasn’t just a flu.”

F:PHOTOReady RoomActionsInsert Request47625#Christopher Patey650912 copy.jpg
Credit: Christopher Patey

For much more on Kumail Nanjiani and Emily V. Gordon’s amazing love story and the movie it inspired, pick up the latest issue of PEOPLE, on newsstands Friday

FROM PEN: How Tom Ford Found ‘Love at First Sight’—and Makes His 30-Year Relationship Last

Gordon was in the coma for eight days while doctors worked to diagnose her condition — Adult-onset Still’s Disease (AOSD), a rare inflammatory immune disorder that can have life-threatening complications. During that time, Nanjiani says he started thinking about his future with Gordon.

“It was honestly right when she went under,” he says. “I remember thinking, ‘Oh I love this woman, and I want to spend the rest of my life with her.If she comes out of this I’m going marry her.’ ”

The two wed three months later at Chicago’s City Hall, and now, exactly 10 years after their wedding, the movie they wrote about their romance, The Big Sick, is opening nationwide on Friday.

“It’s just like having like a great slumber party all the time,” Nanjiani says of their marriage. “It really is. We just love hanging out.”