abort an operation when too long

Is there a way to abort an synchronization operation?
As e.g., the periodic synchronization of IMAP folders can be long an immediatly loop to the next time (duration is longer than set period): how can I abord it to allow other tasks (such as send message on another account) to go on?