-
Path: news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsf
eed1.plix.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.c
om!nntp.giganews.com!postnews.google.com!s31g2000yqs.googlegroups.com!not-for-m
ail
From: Piotr Lipski <l...@g...com>
Newsgroups: pl.comp.programming
Subject: Re: Opowiadanie o GC
Date: Tue, 4 Aug 2009 14:01:38 -0700 (PDT)
Organization: http://groups.google.com
Lines: 54
Message-ID: <9...@s...googlegroups.com>
References: <t...@4...com>
<1...@2...googlegroups.com>
<h4s021$8ca$1@mx1.internetia.pl>
<n...@4...com>
<h4s5hh$h68$1@mx1.internetia.pl>
<b...@4...com>
<h4saip$1bg$1@mx1.internetia.pl>
<1...@4...com>
<8...@o...googlegroups.com>
<l...@4...com>
<7...@n...googlegroups.com>
<3...@k...googlegroups.com>
<6...@r...googlegroups.com>
<1...@k...googlegroups.com>
<b...@s...googlegroups.com>
NNTP-Posting-Host: 83.25.205.126
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1249419698 12825 127.0.0.1 (4 Aug 2009 21:01:38 GMT)
X-Complaints-To: g...@g...com
NNTP-Posting-Date: Tue, 4 Aug 2009 21:01:38 +0000 (UTC)
Complaints-To: g...@g...com
Injection-Info: s31g2000yqs.googlegroups.com; posting-host=83.25.205.126;
posting-account=3TlxoAoAAABULs0oP0Nw6j6Ph_3b_y9Z
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5
(KHTML, like Gecko) Chrome/2.0.172.37
Safari/530.5,gzip(gfe),gzip(gfe)
Xref: news-archive.icm.edu.pl pl.comp.programming:183009
[ ukryj nagłówki ]> > To czy get jest operacją modyfikującą jest szczegółem implementacji.
>
> To nie jest szczegół implementacji, bo od tego zależy, czy wolno robić
> wiele get równolegle.
Jest szczegółem - dokumentacja wyraźnie mówi:
"Because the garbage collector may discard keys at any time, a
WeakHashMap may behave as though an unknown thread is silently
removing entries. In particular, even if you synchronize on a
WeakHashMap instance and invoke none of its mutator methods, it is
possible for the size method to return smaller values over time, for
the isEmpty method to return false and then true, for the containsKey
method to return true and later false for a given key, for the get
method to return a value for a given key but later return null, for
the put method to return null and the remove method to return false
for a key that previously appeared to be in the map, and for
successive examinations of the key set, the value collection, and the
entry set to yield successively smaller numbers of elements."
> > Istotne jest, że w pewnym momencie jakiś obiekt zawarty w WeakHashMap
> > jest "weakly reachable". Można więc "go" usunąć z mapy.
> > Skąd wiadomo, że jest "weakly reachable"? - zaglądamy do dokumentacji
> > WeakReference:
>
> *To* jest właśnie szczegół implementacji. Specyfikacja WeakHashMap nie
> mówi nic o tym, że używa WeakReference.
"Each key object in a WeakHashMap is stored indirectly as the referent
of a weak reference. Therefore a key will automatically be removed
only after the weak references to it, both inside and outside of the
map, have been cleared by the garbage collector."
Jak wół: weak reference.
> Żeby się dowiedzieć, czy wolno robić wiele get równolegle, nie powinno
> być konieczności zastanawiania się, jak WeakHashMap może być
> zaimplementowane. To powinno wynikać ze specyfikacji.
Jest *to* wyraźnie napisane.
> > Dokumentacja jest super. Ty jej nie doczytałeś ;-)
>
> Nie jest.
Dokumentacja jest super. Ty jej nie doczytałeś ;-)
PL
Następne wpisy z tego wątku
- 04.08.09 21:09 Piotr Lipski
- 05.08.09 05:34 Marcin 'Qrczak' Kowalczyk
- 05.08.09 08:47 Maciej Sobczak
- 05.08.09 08:59 Maciej Sobczak
Najnowsze wątki z tej grupy
- Do czego nadaje się QDockWidget z bibl. Qt?
- Bibl. Qt jest sztucznie ograniczona - jest nieprzydatna do celów komercyjnych
- Co sciaga kretynow
- AEiC 2024 - Ada-Europe conference - Deadlines Approaching
- Jakie są dobre zasady programowania programów opartych na wtyczkach?
- sprawdzanie słów kluczowych dot. zła
- Re: W czym sie teraz pisze programy??
- Re: (PDF) Surgical Pathology of Non-neoplastic Gastrointestinal Diseases by Lizhi Zhang
- CfC 28th Ada-Europe Int. Conf. Reliable Software Technologies
- Młodzi programiści i tajna policja
- Ada 2022 Language Reference Manual to be Published by Springer
- Press Release - AEiC 2023, Ada-Europe Reliable Softw. Technol.
- Ada-Europe - AEiC 2023 early registration deadline approaching
- Ada-Europe Int.Conf. Reliable Software Technologies, AEiC 2023
- Ile cykli zajmuje mnożenie liczb 64-bitowych?
Najnowsze wątki
- 2024-06-10 wyobrazcie sobie ze
- 2024-06-10 malowanie samochodu
- 2024-06-10 News from Poland
- 2024-06-10 Czy na pewno będą CŁA na chińskie samochody?
- 2024-06-09 Dlaczego w Polsce sie nic nie udaje, na przykładzie niebieskiego lasera a teraz perskowitów
- 2024-06-09 Dlaczego w Polsce sie nic nie udaje, na przykładzie niebieskiego lasera a teraz perskowitów
- 2024-06-09 Wykrywanie przerwy w długim przewodzie zakopanym w ziemi.
- 2024-06-09 Czemu news.chmurka.nwt jest taki wolny?
- 2024-06-11 Funbox 3.0 zakres adresów DHCP
- 2024-06-11 Re: Funbox 3.0 zakres adresów DHCP
- 2024-06-09 Miernik szybkości netu
- 2024-06-11 Panele PV w pionie (prawie).
- 2024-06-11 czy ta grupa żyje?
- 2024-06-11 Warszawa => Senior React Native Developer <=
- 2024-06-11 Gdańsk => Kierownik Działu Spedycji Międzynarodowej <=