I’m not familiar with hemlock specifically (familiar with CL and C however). In the past I’ve just kept the signal handler very simple: set some global variables and maybe an event/CV or similar. The main thread is then triggered from that - and the complex UI code is kept on the main thread.