Если операция повышает исключение, что Ваш код не обрабатывает, BackgroundWorker
выгоды исключение и передает его в RunWorkerCompleted
обработчик событий, где оно представлено как свойство Error System.ComponentModel.RunWorkerCompletedEventArgs
. Если Вы будете работать под отладчиком Visual Studio, отладчик повредится в точке в обработчике событий DoWork, где необработанное исключение было повышено.
http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.dowork.aspx
If the endpoints match exactly then you can just store each object twice in a hash, once by each endpoint. Then, for each object, look up both its end points. You will get any other objects that need to be joined.
If the endpoints have any kind of imprecision, then you will need a spatial index, and probably one that uses an R-tree. You can get a similar effect by just making a 2d hash grid. The hash grid contains buckets of nearby endpoints. You will need to check neighboring cells.