[Olena-patches] olena-2.0-81-gd5ba09d Revamp *_threshold functions.