thread and signal