My code needs to transmit regular packets onto a serial bus, however when the user holds the mouse down on a slider etc. then the transmit function stops until they let go

Is there a clever way to continue processing whilst this is happening?

I am thinking multithreading might be a way around this problem but is there a simpler way?

Cheers