This numerical study reveals that the thermal convection, induced by the axial gradient of temperature in a rotating pipe, suffers from the shear-layer instability if the Prandtl number, Pr, is small. As Pr increases, this instability is suppressed by the stable density stratification in the field of centrifugal force. In an annular pipe, the thermal instability develops for large Pr if a temperature of walls is prescribed. For a narrow annulus, these features agree with the known results for a planar flow driven by gravity and a horizontal gradient of temperature. It is shown here that the thermal instability does not develop if the walls are adiabatic. The centrifugal and Marangoni convection of a liquid, partially filling the pipe, also suffers from the shear-layer instability for small Pr and has no thermal instability. These features agree with the experiments for the planar flow performed by Kirdyashkin. The obtained results are of fundamental interest and can be relevant for the development of centrifugal heat exchangers.