Microsoft.Identity.Client.Utils.MacMainThreadScheduler
This class implements a main thread scheduler for macOS applications. It should be also working on other platforms, but it is primarily designed for macOS.
It is mainly designed for internal use to support the MSAL library in "switching to the main thread anytime".
However, external users can also call it if needed.
Gets the singleton instance of MacMainThreadScheduler
Check if the current thread is the main thread.
Check if the message loop is currently running.
Run on the main thread asynchronously.
Start the message loop on the main thread to process actions
Stop the main thread message loop