Here's something from Quora…
Various plant seeds or pits contain amygdalin, which releases cyanide when metabolized. The amounts are small, so that in general, toxicity is not seen except in cases where a combination of factors seriously exacerbates the problem. Basically, you need
...a pit or seed from some fruit of a plant in the family Rosaceae, generally from Prunus genus (yes, this does include cherries, as well as plums, peaches, apricots, and almonds)
...of a variety that has an unusually high amygdalin content, which is to say, a bitter rather than sweet variety, such as for example bitter almonds or bitter apricot pits
...eaten in quantity, generally in the form of just the pits
Under such conditions, you can ingest enough amygdalin to kill you. However, while (some) cherry pits do apparently contain amygdalin at the same concentrations as bitter apricot kernels[1], the amount you would have to eat is considerably more than two pits. The LD50 for bitter almonds (which are also similar to cherry and apricot kernels, with ~5% amygdalin content) in rats is estimated to be a little more than 3 grams per Kg of body weight.
If we extrapolate to humans, we might expect to see significant mortality in adults once we started to get in to the range of hundreds of grams of pits consumed. Two cherry pits weigh about a gram, together. And not only that, but unless you grind them up, any amygdalin will be released slowly enough to seriously mitigate the toxicity. I think you would need to grind up several hundred cherry pits and then eat the paste before it would have a significant chance of killing you.
References: