Sex and yeast infections

So I took a pill for my yeast infection today, is it okay to have sex on Friday or should I wait longer?? My doctor told me it should clear up right away but I've tried 3 different medicines so I'm worried it won't.