メッセージループ C# Dispatcher.Run() using System.Windows.Threading; Dispatcher.CurrentDispatcher.InvokeAsync(() => { // いろいろな処理... // メッセージループを終了させる Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Normal); }); Dispatcher.Run(); WPF とか WinForms とかでは、フレームワークがすでにメッセージループを回しているので、自分で Dispatcher.Run() する必要はない。 JavaScript 自分で書く必要なし。 Python asyncio.run(最初に実行するasync関数) import asyncio async def main(): # いろいろな処理... pass asyncio.run(main()) await で待つ sleep 実用的に使うことは少ないけど、実験ではよく使用するので...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with return
Contact return, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack