I have an application, developed in Visual Studio 2003 and running CF
1.0, where I have two threads saving to the database. I have used the
SyncLock keyword in VB.Net to prevent both threads saving at the same
time.
On a machine running Pocket PC 2003, it works fine. But when I try using
it on Pocket PC 2002 it goes into a deadlock. The foreground thread
waits for the locked object, but the background thread seems not to run
(doesn't hit breakpoints in debug mode).
Does anyone know of any difference in how threading is done on PPC 2002
and PPC 2003 that might account for this strange behaviour?
Is there something I can do to avoid this?
Daniel Moth - 03 Apr 2006 13:41 GMT
Nothing specific comes to mind (even though the underlying core OS versions
are different).
The first thing I would, before comparing platform versions, is make sure
that the NETCF versions are the same (down to the Service Pack):
http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ%2FDeterminingVersion
If they are the same, then I would create a small repro and post it here for
feedback...
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
>I have an application, developed in Visual Studio 2003 and running CF 1.0,
>where I have two threads saving to the database. I have used the SyncLock
[quoted text clipped - 7 lines]
> and PPC 2003 that might account for this strange behaviour?
> Is there something I can do to avoid this?
Ilya Tumanov [MS] - 03 Apr 2006 19:57 GMT
I would suggest installing NETCF V2 and running application against it with
compatibility mode disabled using this config file:
<configuration>
<runtime>
<compatibilityversion major="2" minor="0"/>
</runtime>
<startup>
<supportedRuntime version="v2.0.5056"/>
</startup>
</configuration>
as described here:
http://blogs.msdn.com/davidklinems/archive/2005/04/19/409541.aspx
I have a feeling you're going to get NotSupportedException with this error
message:
Control.Invoke must be used to interact with controls created on a separate
thread.

Signature
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
*** Want to find answers instantly? Here's how... ***
1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactfra
mework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
>I have an application, developed in Visual Studio 2003 and running CF 1.0,
>where I have two threads saving to the database. I have used the SyncLock
[quoted text clipped - 7 lines]
> and PPC 2003 that might account for this strange behaviour?
> Is there something I can do to avoid this?