home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,694 of 2,753   
   Michiel Helvensteijn to John   
   Re: Promoting weak pointers   
   17 Jun 09 05:58:43   
   
   From: m.helvensteijn@gmail.com   
      
   On Jun 16, 3:55 pm, John wrote:   
      
   > [Now I'm confused, too.  This is an ordinary race condition of the kind   
   > that every parallel program has to handle, and would present the same   
   > issues no matter what kind of pointer it is. -John]   
      
   Agreed. Andrew simply suggested that one way to avoid the the   
   destruction of the object (by thread A) between the test and the   
   access (in thread B) is to first promote the weak pointer in thread B   
   to temporarily keep the object alive.   
      
   It's certainly a way to go. But I believe a locking mechanism   
   specifically for this purpose would be more elegant. Anyway, it will   
   be a while before we have to worry about threading. There's still   
   plenty to do on sequential programming.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca