Run your task asynchronously (in thread/process) and control/communicate with them.