Question: are thiols good leaving groups?
Answer: The positive charge on the sulfur also makes it an excellent leaving group, as the resulting product will be a neutral and very stable sulfide. All in all, in both reactions we have a reasonably good nucleophile, an electron-poor, unhindered electrophile, and an excellent leaving group.