text: One route to thioesters involves the reaction of an acid chloride with an alkali metal salt of a thiol:
  Another common route entails the displacement of halides by the alkali metal salt of a thiocarboxylic acid. For example, thioacetate esters are commonly prepared by alkylation of potassium thioacetate:
  The analogous alkylation of an acetate salt is rarely practiced. The alkylation can be conducted using Mannich bases and the thiocarboxylic acid:
  Thioesters can be prepared by condensation of thiols and carboxylic acids in the presence of dehydrating agents:
  A typical dehydration agent is DCC. Efforts to improve the sustainability of thioester synthesis have also been reported utilising safer coupling reagent T3P and greener solvent cyclopentanone. Acid anhydrides and some lactones also give thioesters upon treatment with thiols in the presence of a base.
  Thioesters can be conveniently prepared from alcohols by the Mitsunobu reaction, using thioacetic acid.
  They also arise via carbonylation of alkynes and alkenes in the presence of thiols.