[MT] Make signal thread safe, and provide usable API.