What does Canary in a coal mine mean?

Canary in a coal mine meaning in Idioms Dictionary

(UK) A canary in a coal mine is an early warning of danger.