Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Using the Compact Framework Monitor class on Windows CE-based devices


Summary

The Monitor class appears to behave differently on Windows CE-based systems than it behaves on desktop systems. This allso affects the implementation of the C# lock statement and the Visual Basic SyncLock code block since their implementation is based upon static methods of the Monitor class.

↑ Back to the top


More Information

The underlying implementation of Monitor differs considerably between the .NET Compact Framework and the .NET Framework. The .NET Compact Framework is designed for use on real-time systems, like Windows CE and its derivatives, while the .NET Framework is designed for use on desktop or server systems which are not real-time.

There may be subtle timing differences observed. In the event that identical behavior is required of code expected to run under both the .NET Compact Framework and the .NET Framework, it can be achieved by using a Mutex instead of Monitor (or lock or SyncLock.)

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2718559
Revision : 1
Created on : 1/7/2017
Published on : 6/4/2012
Exists online : False
Views : 171