Threads in EditorScript?

Is it possible to use Threads in Editor scripts? My problem is I have some editor functions that can be quite time consuming. What I want to achieve is that Unity stays responsive or at least shows a status bar while performing theses tasks. At the moment the function is started from and EditorWindow.OnGUI(), so the function blocks unity completly. Even Debug.Log's won't show up in the Console (although they do in the log file itself). Is there any way I could at least show a status bar? (like the one that shows up on import)

Yes, you can use Threads in EditorScript. Just make sure to make proper synchronization between the threads.

As long as you don't call into the unity API from the threads, then it's fine. The issue is that a lot of things do it, for example

if (myTransform != null) {

will throw exceptions at you, as annoying as that may seem.

For progress bars, you can use EditorUtility.DisplayProgressBar :

http://unity3d.com/support/documentation/ScriptReference/EditorUtility.DisplayProgressBar.html

or one of the other progress bars in the class