added a function to make the thread exit to ArmZabbixAPI.