using namespace System; using namespace System::Threading; namespace SystemThreadingExample { public ref class Work { public: void StartThreads() { // Start a thread that calls a parameterized static method. Thread^ newThread = gcnew Thread(gcnew ParameterizedThreadStart(Work::DoWork)); newThread->Start(42); // Start a thread that calls a parameterized instance method. Work^ someWork = gcnew Work;
名前空間: System アセンブリ:System.Runtime.dll アセンブリ:mscorlib.dll アセンブリ:netstandard.dll ソース:ThreadAttributes.cs ソース:ThreadAttributes.cs ソース:ThreadAttributes.cs 重要 一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。 public ref class STAThreadAttribute sealed : Attribute [System.AttributeUsage(System.AttributeTargets.Method)] public sealed class STAThreadAttribu
名前空間: System.Threading.Tasks アセンブリ:System.Threading.Tasks.dll アセンブリ:System.Runtime.dll アセンブリ:mscorlib.dll アセンブリ:netstandard.dll ソース:Task.cs ソース:Task.cs ソース:Task.cs 重要 一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。 public ref class Task : IAsyncResult public ref class Task : IAsyncResult, IDisposable public class Task : IAsyncResult public class T
例 次の例では、乱数ジェネレーターを使用して、11 個の異なる計測器から 10 個の整数値を読み取るデータ収集アプリケーションをエミュレートします。 0 の値は、1 つの計測器に対して測定が失敗したことを示します。その場合、操作を取り消し、全体的な平均を計算する必要はありません。 この例では、操作のキャンセルの可能性を処理するために、オブジェクトに渡されるキャンセル トークンを生成するオブジェクトをTaskFactoryインスタンス化CancellationTokenSourceします。 さらに、 オブジェクトは TaskFactory 、特定のインストルメントの読み取りを収集する各タスクにキャンセル トークンを渡します。 メソッドは TaskFactory.ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く