Diiference in threading on PPC 2002 and PPC 2003? ( Deadlock onPPC 2002, runs fine on PPC 2003. )

  • Thread starter Thread starter Jan Obrestad
  • Start date Start date
J

Jan Obrestad

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?
 
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.

--
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.compactframework?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).
 
Back
Top