Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #2948
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe03.iad.POSTED!8ad76e89!not-for-mail |
|---|---|
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
| User-Agent | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Threads and statics |
| References | <905p9gFpuoU1@mid.individual.net> <_8udnYBYP_NkLQDQnZ2dnUVZ_gGdnZ2d@earthlink.com> <e325cb5e-ca0a-4d8b-b865-1f5a5b06811e@x1g2000yqb.googlegroups.com> <b6408127-4a62-4bae-845d-ff2872427357@j13g2000yqj.googlegroups.com> |
| In-Reply-To | <b6408127-4a62-4bae-845d-ff2872427357@j13g2000yqj.googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Lines | 47 |
| Message-ID | <Rhqnp.36158$tL6.7871@newsfe03.iad> (permalink) |
| X-Complaints-To | abuse@newsgroups-download.com |
| NNTP-Posting-Date | Thu, 07 Apr 2011 21:47:29 UTC |
| Organization | Public Usenet Newsgroup Access |
| Date | Thu, 07 Apr 2011 18:47:28 -0300 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2948 |
Show key headers only | View raw
On 11-04-07 12:20 PM, Lew wrote: > On Apr 7, 10:38 am, Robert Klemme <shortcut...@googlemail.com> wrote: >> On 7 Apr., 14:41, Patricia Shanahan <p...@acm.org> wrote: >> >>> On 4/7/2011 5:34 AM, Dirk Bruere at NeoPax wrote: >> >>>> Is there a problem with multiple threads using the same static method of >>>> a class? >> >>> The local variables for a method go on the calling thread's stack, >>> regardless of whether the method is static or not. >> >>> Static data presents the same issues when accessed from a static method >>> as when accessed from non-static methods. >> >> I would word it differently: shared mutable state presents concurrency >> issues if not properly synchronized. Whether the data is stored in a >> static variable or a member variable (or even a database outside the >> JVM) does not really matter for the concurrency implications. >> > > You'd be wording a different "it". The problems go beyond concurrency > issues. They can present in single-threaded code, too. > > For example, the dreaded 'java.util.ConcurrentModificationException' > is not limited to multithreaded scenarios. > -- > Lew It's not, and in fact most occurrences of ConcurrentModificationException I've seen are not in multi-threaded situations, they are in single-threaded scenarios. I sort of wish they'd come up with a different name than ConcurrentModificationException; the exception usually has to do with iterators in the presence of modification of the iterated thing, and the name of the exception doesn't reflect that. If I don't have iterators involved I can concurrently modify to my heart's content (although I probably don't want to). AHS -- That's not the recollection that I recall...All this information is certainly in the hands of the auditor and we certainly await his report to indicate what he deems has occurred. -- Halifax, Nova Scotia mayor Peter Kelly, who is currently deeply in the shit
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Threads and statics Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2011-04-07 13:34 +0100
Re: Threads and statics Patricia Shanahan <pats@acm.org> - 2011-04-07 05:41 -0700
Re: Threads and statics Robert Klemme <shortcutter@googlemail.com> - 2011-04-07 07:38 -0700
Re: Threads and statics Lew <lew@lewscanon.com> - 2011-04-07 08:20 -0700
Re: Threads and statics Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-07 18:47 -0300
Re: Threads and statics markspace <-@.> - 2011-04-07 09:32 -0700
Re: Threads and statics Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-07 21:14 -0400
Re: Threads and statics Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-04-09 18:15 +0200
Re: Threads and statics Lew <noone@lewscanon.com> - 2011-04-09 13:06 -0400
Re: Threads and statics Patricia Shanahan <pats@acm.org> - 2011-04-09 09:29 -0700
Re: Threads and statics Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-04-09 09:29 -0700
Re: Threads and statics Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-09 14:57 -0400
Re: Threads and statics "Mike Schilling" <mscottschilling@hotmail.com> - 2011-04-10 23:10 -0700
Re: Threads and statics Tom Anderson <twic@urchin.earth.li> - 2011-04-11 13:25 +0100
Re: Threads and statics Lew <noone@lewscanon.com> - 2011-04-11 08:58 -0400
csiph-web