improving how sendSignal is generated in async code