--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8EC74417-C4AD-4490-9231-6E869EE72D93%40ix.netcom.com.
You cannot make that assumption. It's not about what the race detector can detect.Goroutine one:Writes non-synchronized XWrites atomic YWrites non-synchronized Z with the value of X+YGoroutine twoReads atomic Y and sees the new value
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BYjuxtd%2BpaU_BNxXDrMAN9v71r-Qhm9LcXcN2fTtjD_6oWw-Q%40mail.gmail.com.
On Sep 15, 2022, at 9:24 AM, burak serdar <bse...@computer.org> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAMV2Rqr4vggPOWjiQg6qN0tJjhhXncKHLMCDwkqZTHBJJ7%3Dmug%40mail.gmail.com.
On Sep 15, 2022, at 9:39 AM, Robert Engels <ren...@ix.netcom.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/93E2826E-1D85-48BE-BBD3-ED17F70C74F2%40ix.netcom.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/621ABC85-EFBF-4B9D-B94B-F27D6BDA7E85%40ix.netcom.com.
I cannot speak to "other accepted concurrency designs" here. Simply that Go does not guarantee the operation you want it to, the memory model does not actually imply that it does, and the last sentence of the memory model is the most important one here: don't be clever.
This is simply incorrect. The ‘issue’ about clarifying the memory has been about “happens before” since the beginning. The model was clarified. The race detector cannot cope with it.I don’t think you fully understand what “happens before” means. Please read the article I referred to.
volatile
variables.”On Thu, Sep 15, 2022 at 9:11 AM Thomas Bushnell BSG <tbus...@google.com> wrote:I cannot speak to "other accepted concurrency designs" here. Simply that Go does not guarantee the operation you want it to, the memory model does not actually imply that it does, and the last sentence of the memory model is the most important one here: don't be clever.I believe that's what we are discussing here. The way I read it, the memory model does imply that a non-synchronized operation x sequenced before an operation y that happened before z implies that all operations sequenced after z happens after x.
Thomas
Thomas
On Sep 15, 2022, at 10:59 AM, Robert Engels <ren...@ix.netcom.com> wrote:I have not misunderstood it. Nor have I misunderstood the semantics with Javas volatile. One aspect of Go is broken - tbd - but most likely it is simply the race detector cannot support it (as my concurrent code functions as expected given the memory model).On Sep 15, 2022, at 10:22 AM, Thomas Bushnell BSG <tbus...@google.com> wrote:The GCC Wiki you reference is speaking only of a case where all the variables concerned are in a class that specifies sequentially consistent ordering. You have also misunderstood the C++ semantics, which is understandable since the language is a disaster of bad specification.Thomas
On Thu, Sep 15, 2022 at 11:20 AM robert engels <ren...@ix.netcom.com> wrote:
Finally, you left out the most important clause from the “memory model” document:"The preceding definition has the same semantics as C++’s sequentially consistent atomics and Java’svolatile
variables.”Both of these require the “happens before” semantics I describe - not what you are describing.
On Sep 15, 2022, at 10:16 AM, robert engels <ren...@ix.netcom.com> wrote:
This is simply incorrect. The ‘issue’ about clarifying the memory has been about “happens before” since the beginning. The model was clarified. The race detector cannot cope with it.
I don’t think you fully understand what “happens before” means. Please read the article I referred to.
On Sep 15, 2022, at 10:11 AM, Thomas Bushnell BSG <tbus...@google.com> wrote:
I cannot speak to "other accepted concurrency designs" here. Simply that Go does not guarantee the operation you want it to, the memory model does not actually imply that it does, and the last sentence of the memory model is the most important one here: don't be clever.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAMV2RqoZ2J8hHY6mD_rNdJu7W4p0osW0E%2BUxx8pYnh815%3DFmTw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20cacd2f-0fd7-43b5-ba65-74e9ba008569n%40googlegroups.com.
Is there any way to perform “lazy loads” in Go?