A simple worker to run function calls in a separate process