I want to create the script which runs function in background, but leaves ability to query that function about results, pause, resume or other way to interact with it.