MessageQueue.InfiniteTimeout フィールド
アセンブリ: System.Messaging (system.messaging.dll 内)


MessageQueue は、同期と非同期の 2 種類のメッセージ取得をサポートします。同期メソッドである Peek と Receive を使用して、プロセス スレッドは新しいメッセージがキューに到達するまで待機する時間間隔を指定します。指定した時間間隔が InfiniteTimeout の場合、新しいメッセージが利用可能になるまで、そのプロセス スレッドはブロックされています。一方、BeginPeek と BeginReceive (非同期メソッド) を使用すると、キューにメッセージが到達するまで、メイン アプリケーションのタスクは別のスレッドで継続します。

InfiniteTimeout メンバの使用方法を示すコード例を次に示します。
// Create a new message. Message msg = new Message(); // Set the message's TimeToReachQueue property to // MessageQueue.InfiniteTimeout. msg.TimeToReachQueue = MessageQueue.InfiniteTimeout; // Display the new value of the message's TimeToReachQueue property. Console.WriteLine("Message.TimeToReachQueue: {0}", msg.TimeToReachQueue.ToString());
// Create a new message. Message msg = new Message(); // Set the message's TimeToReachQueue property to // MessageQueue.InfiniteTimeout. msg.set_TimeToReachQueue(MessageQueue.InfiniteTimeout); // Display the new value of the message's TimeToReachQueue property. Console.WriteLine("Message.TimeToReachQueue: {0}", System.Convert.ToString(msg.get_TimeToReachQueue()));


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMessageQueue.InfiniteTimeout フィールドを検索する場合は、下記のリンクをクリックしてください。

- MessageQueue.InfiniteTimeout フィールドのページへのリンク