Question: Can someone please explain what's exactly going on with this line of code starting at CGPoint. This comes from the `-(void)ccTouchesBegan`... 

```
UITouch* touch = [touches anyObject];
CGPoint location = [touch locationInView:[touch view]];

```

In particular I'm not understanding the [touch view] part.

Thanks

Answer: 
BackgroundWorker seems appropriate here; it should be configured something along those lines:

```
var worker = new BackgroundWorker();
worker.WorkerReportsProgress = false;
worker.WorkerSupportsCancellation = false;
worker.DoWork += worker_DoWork;
worker.RunWorkerCompleted += worker_RunWorkerCompleted;
worker.RunWorkerAsync();

```

Then you have the handlers:

```
void worker_DoWork(object sender, DoWorkEventArgs e)
{
    //start notepad process here.
}

void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
    //read somefile.txt here.
}

```
From the sounds of things your application isn't running the `Process.WaitForExit` call on a separate thread otherwise there wouldn't be any hanging.

`BackgroundWorker`, `Thread` and the `ThreadPool` are all useful tools, but they can be difficult and cumbersome to work with and get right, the Task Parallel Library with `System.Threading.Task` has somewhat "superseded" using threads directly for most operations you need to perform asynchronously.

See: [Threads and the new Task library in C#](https://stackoverflow.com/questions/3418979/threads-and-the-new-task-library-in-c-sharp)

So your code becomes.

```
Task.Factory.StartNew(() =>
{
   var proc = new Process("...");
   proc.WaitForExit();
   File.Read("...");
});

```