fix:    signal exmaple: check canceled flag
fix: delete some code