How do I let the function in a form run in the background without slowing down/stopping my entire application until it has finished?