[HN Gopher] "Once" one-time concurrent initialization with an in...
___________________________________________________________________
"Once" one-time concurrent initialization with an integer
Author : memefrog
Score : 11 points
Date : 2023-08-01 21:58 UTC (1 hours ago)
(HTM) web link (nullprogram.com)
(TXT) w3m dump (nullprogram.com)
| latchkey wrote:
| This immediately made me think of 'double checked locking', which
| was badly broken in early Java and then fixed later. Reading the
| wikipedia again after many years, it mentions a lot of the same
| things in this article.
|
| https://en.wikipedia.org/wiki/Double-checked_locking
| dataflow wrote:
| I think this assumes the first thread will actually succeed.
| Don't forget complications if you need failure/exception
| handling...
___________________________________________________________________
(page generated 2023-08-01 23:01 UTC)