Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / April 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jan Obrestad - 03 Apr 2006 13:33 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.