Successfully put the transverse curve search into a thread, and it is
safe to stop the calculation. It was quite painful to find a way it
works, but it is important beacuse this calculation can easily take very
long.