You Are Here:

Community: Developer Discussion Boards

#1 Old synchronization in series 40 - 2003-08-14, 09:51

Join Date: Aug 2003
Posts: 1
aminoacid
Offline
Registered User
I have two thread excutes same code...so I made the method "synchronized". like this

public synchronized void doSomething(int var) {};

two thread: 1 is the user interaction thread...
another is a timer simulating thread...

and this works well on other platforms..but on series 40, for example, 6610 & 6100, the program seems to be very easy to deadlock and stop responsing...is it a bug or any solution to this?
Reply With Quote

#2 Old 2003-08-14, 16:02

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
I've had deadlocking problems using sync. methods on my 6100... deadlocks where I think it should not be possible. So either there's a problem, or I'm less talented than I like to think (both seem equally likely).

I fixed it only by using a single-threaded approach, or not using synchronized methods. I have had more success when using synchronized block (like synchronized (object) {}).
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia