  In the prevailing model of galaxy formation and evolution, the process of gas
accretion onto central galaxies undergoes a transition from cold-dominated to
hot-dominated modes. This shift occurs when the mass of the parent dark matter
halos exceeds a critical threshold known as $M_{shock}$. Moreover, cold gas
usually flows onto central galaxies through filamentary structures, currently
referred to as cold streams. However, the evolution of cold streams in halos
with masses around $M_{shock}$, particularly how they are disrupted, remains
unclear. To address this issue, we conduct a set of idealised hydrodynamic
simulations. Our simulations show that (1) for a gas metallicity
$Z=0.001-0.1Z_{\odot}$, cold stream with an inflow rate $\sim 3\,
\rm{M_{\odot}}/yr$ per each can persist and effectively transport cold and cool
gas to the central region ($< 0.2$ virial radius) in halos with mass $10^{12}\,
\rm{M_{\odot}}$, but is disrupted at a radius around $0.2$ virial radius due to
compression heating for halos with mass $3 \times 10^{12}\, \rm{M_{\odot}}$.
(2) At $z\sim 2$, the maximum halo mass that capable of hosting and sustaining
cold streams $M_{stream}$ is between $1\times 10^{12} \rm{M_{\odot}}$ and
$1.5\times 10^{12}\rm{M_{\odot}}$ for gas metallicity $Z=0.001Z_{\odot}$, while
for a higher gas metallicity $Z=0.1Z_{\odot}$, this value increases to $\sim
1.5\times 10^{12}\rm{M_{\odot}}$. (3) The evolution and ultimate fate of cold
streams are determined primarily by the rivalry between radiative cooling and
compression. Stronger heating due to compression in halos more massive than
$M_{stream}$ can surpass cooling and heat the gas in cold streams to the hot
($\geq 10^6\,$ K) phase.
