Is it possible to use asynchronous functions "in-editor"?

I’m looking at computing the content for and saving a file that will be rather large. Something like 1-million lines of text. I’d like to not block unity for the very long it will take.

From what I’ve seen, yield doesn’t do much in javascript unity from editor code. Is it possible at all to run functions asynchronously from editor code?

If you’re only writing into a file then you can create a separate thread that do the job.
I don’t know how to do it in javascript but in c# its quite simple.