This thread is years old but I have a question or two. So if I understand all of this, there are at least two different ways to run some code in the background. One is using Tasks (ala CreateTask) and another is using processes using CreateProc. Tasks cannot access any file resources and probably has some other limitations as well. Processes can, it seems, but are more difficult to create and use.
I am still trying to understand MsgPort usage well as well. So, looking at includes and autodocs it seems like a Task struct has a tc_UserData value. If you use something like CreateProc or CreateNewProcTags how can you pass data using tc_userData? Possibly the answer is you can't.
Let me retry this question (sorry; I'm trying to understand as I type this), is it possible to pass arguments to your user defined function that gets executed via CreateProc or CreateNewProcTags?
If you can get access to the Task (through FindTask(NULL) or something like it) you may be able to use tc_userData but I don't know how to set this before the user function executes when using Processes.
Otherwise it seems like one might want to use a MsgPort to send the parameters to the user defined function. If so, and I am guessing here, would one's user defined function immediately set up a MsgPort and wait for messages from the creator of the Process bearing the parameters before continuing on to it's real purpose? Is there a better way?