Gas safety valves generally operate using a mechanical mechanism that involves pressure sensing. When the normal pressure of gas diminishes beyond a preset threshold—often due to a leak—the valve automatically closes. This action effectively prevents the escape of gas into the atmosphere. Modern gas safety valves can be equipped with various technologies, including electronic sensors and alarms, to enhance their reliability and responsiveness.