pioneerspacesim/pioneer — pull request #2722 by lwho (2014-02-04 21:11:44+00:00)
Title: GeoPatch threading fixes

This fixes the terrain threading issues discussed in #2707

1. The ```GeoPatchJobs``` no longer access data that might be removed after game end (patch by @fluffyfreak)
2. The ```GeoPatchJobs``` are canceled when the associated ```GeoPatch``` is destroyed. This doesn't actually stop the job, but when it finishes normally, it won't submit it results anymore.

It turned out, that the suggested changes to ```JobQueue``` weren't necessary, because we already have a function that is executed in the main thread for a canceled job: The job destructor. And in some cases it might be useful to perform some actions immediately, when a job is canceled (for example, here the back-pointer to the ```GeoPatch``` is cleared).

Fixes #2707