-
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
- Alg. kompresji LZW
- Popr. 14. Nauka i Praca Programisty C++ w III Rzeczy (pospolitej)
- Arch. Prog. Nieuprzywilejowanych w pełnej wer. na nowej s. WWW energokod.pl
- 7. Raport Totaliztyczny: Sprawa Qt Group wer. 424
- TCL - problem z escape ostatniego \ w nawiasach {}
- Nauka i Praca Programisty C++ w III Rzeczy (pospolitej)
- testy-wyd-sort - Podsumowanie
- Tworzenie Programów Nieuprzywilejowanych Opartych Na Wtyczkach
- 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??
Najnowsze wątki
- 2025-02-12 Warszawa => Expert Recruiter 360 <=
- 2025-02-12 Ostrów Wielkopolski => Area Sales Manager OZE <=
- 2025-02-12 Bieruń => Regionalny Kierownik Sprzedaży (OZE) <=
- 2025-02-12 Dęblin => Node.js / Fullstack Developer <=
- 2025-02-12 Kraków => PHP Full Stack Developer <=
- 2025-02-12 Karta dźwiękowa stereo
- 2025-02-12 Dęblin => JavaScript / Node / Fullstack Developer <=
- 2025-02-12 Gdańsk => Specjalista ds. Sprzedaży <=
- 2025-02-12 Łódź => NodeJS Developer <=
- 2025-02-12 Błonie => Sales Specialist <=
- 2025-02-12 Dziwne zachowanie magistrali adresowej w 8085
- 2025-02-11 Mini pecet
- 2025-02-10 Spalił się spaliniak
- 2025-02-10 zarowka wifi - z sensowna apka lub lepiej albo lokalnie lub przez web. I zeby harmonogram miala
- 2025-02-10 Chrzanów => Programista NodeJS <=