OpenSiv3D icon indicating copy to clipboard operation
OpenSiv3D copied to clipboard

メインスレッド以外からメインスレッド用の関数を呼び出せるようにする

Open sthairno opened this issue 3 years ago • 0 comments

WinFormsやWPFのようなInvoke()命令があると便利そうです。 Invoke()命令は、主にメインスレッド(UIスレッド)からしか呼び出せない関数をメインスレッド以外から呼び出したいときに使います。 C#ではInvoke()から関数の戻り値を受け取ることもできるようです。

大まかな流れは下図の通りです。 image

参考 https://docs.microsoft.com/ja-jp/dotnet/api/system.windows.forms.control.invoke?view=net-5.0 https://qiita.com/otagaisama-1/items/b101228f183249cc65b5

sthairno avatar Sep 05 '21 05:09 sthairno