Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3373
| Date | 2011-04-29 21:10 -0700 |
|---|---|
| From | Patricia Shanahan <pats@acm.org> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: A question about synchronized threads |
| References | <3f249d87-aaf8-4732-9ee8-fd112cf82553@f31g2000pri.googlegroups.com> <ipen7h$dip$1@dont-email.me> <f56d0826-0b46-4822-9059-22159aebeec2@d26g2000prn.googlegroups.com> <ipev16$bo5$1@dont-email.me> <ipevfj$fpn$1@dont-email.me> |
| Message-ID | <RoqdnU0C7ZolFibQnZ2dnUVZ_omdnZ2d@earthlink.com> (permalink) |
On 4/29/2011 11:19 AM, Daniele Futtorovic wrote: > On 29/04/2011 20:11, markspace allegedly wrote: >> On 4/29/2011 9:09 AM, byhesed wrote: >>> >>> Thank you. I understand what you elaborated on. >> >> >> I hope so. "Optimizing" threads is tricky, and when you reason about >> how to optimize it's easy to make a mistake. Prominent Java engineers >> (i.e., Doug Lea) have been known to make mistakes. >> >> Remember, m1 and m2 can't share mutual state. If they do, you're going >> to have problems accessing any variables that are shared. > >> I'd be interested in seeing what it is you want to optimize. What does >> this class really look like? I think it might be instructive for you to >> post your full class, and let other comment on how best to "optimize" it. > > Ten bucks say it's a class with too many methods. ;) > It may only have two methods. However, I would not bet against it being a class with too much unrelated data. There are two methods in the class that operate on two sets of data that are not only totally disjoint, but so unrelated that it does not matter if they are inconsistent with each other. Patricia
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
A question about synchronized threads byhesed <byhesed@gmail.com> - 2011-04-29 08:35 -0700
Re: A question about synchronized threads Lew <noone@lewscanon.com> - 2011-04-29 11:53 -0400
Re: A question about synchronized threads byhesed <byhesed@gmail.com> - 2011-04-29 09:12 -0700
Re: A question about synchronized threads Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-29 21:01 -0400
Re: A question about synchronized threads byhesed <byhesed@gmail.com> - 2011-04-29 18:43 -0700
Re: A question about synchronized threads Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-04-29 17:58 +0200
Re: A question about synchronized threads byhesed <byhesed@gmail.com> - 2011-04-29 09:09 -0700
Re: A question about synchronized threads markspace <-@.> - 2011-04-29 11:11 -0700
Re: A question about synchronized threads Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-04-29 20:19 +0200
Re: A question about synchronized threads markspace <-@.> - 2011-04-29 15:21 -0700
Re: A question about synchronized threads Patricia Shanahan <pats@acm.org> - 2011-04-29 21:10 -0700
Re: A question about synchronized threads dagon@dagon.net (Dagon) - 2011-04-29 15:55 -0700
Re: A question about synchronized threads Alice <quaxx1108@example.com> - 2011-04-29 20:08 -0400
Re: A question about synchronized threads markspace <-@.> - 2011-04-29 19:07 -0700
Re: A question about synchronized threads byhesed <byhesed@gmail.com> - 2011-04-29 18:49 -0700
Re: A question about synchronized threads Lew <noone@lewscanon.com> - 2011-05-03 18:57 -0400
Re: A question about synchronized threads Deeyana <d.awlberg@hotmail.invalid> - 2011-05-04 00:17 +0000
Re: A question about synchronized threads Lew <noone@lewscanon.com> - 2011-05-04 12:45 -0400
Re: A question about synchronized threads Deeyana <d.awlberg@hotmail.invalid> - 2011-05-04 19:59 +0000
csiph-web