SaveDocument is already present in the original code in the extended threading class "ExportThread"
TO not make it happens in a thread.
So to directly execute it in ExecuteConversion.
The use of SendCoreMessage is a way, from a thread (and it's the case for you in ExportThread::Main) to send a message, that Cinema 4D will process on the Main thread (I didn't use in my code because in my case I'm in the main thread).
So you can react to this message and do something (in your case SaveDocument). It was just for your information, regarding what's your thread is doing (only calling SaveDocument) I would say that using a thread here make no sense, and you should directly call SaveDocument in your ExecuteConversion function.
Hope it's more clear.
Cheers,
Maxime.