<html><head></head><body>Thanks, it was actually increment I was interested in. <br>
<br>
Can one get around it with an intermediate variable? <br>
<br>
$var(y) = $shv(x);<br>
$shv(x) = $var(y) + 1;<br>
<br>
I would just use a lock(), but I'm afraid that it will serialise message processing too much at high volume, due to the blocking. <br>
<br><br><div class="gmail_quote">On 19 November 2014 01:23:14 GMT-05:00, Daniel-Constantin Mierla <miconda@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">For what kind of operation?<br /><br />Reading or setting the value are safe, but updating it with its own<br />value used in an expression is not.<br /><br />Safe:<br /><br />xlog("value is $sht(x)\n");<br />$sht(x) = 1;<br /><br />Race:<br /><br />$sht(x) = $sht(x) + 1;<br /><br />Cheers,<br />Daniel<br /><br />On 19/11/14 00:27, Alex Balashov wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Does setting $shv()s in script require lock()ing, or is it inherently<br /> thread-safe?<br /><br /> Thanks!</blockquote><br /></pre></blockquote></div><br>
--<br>
Sent from my Nexus 10, with all the figments of autocorrect that might imply.<br>
<br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
United States<br>
Tel: +1-678-954-0670<br>
Web: <a href="http://www.evaristesys.com">http://www.evaristesys.com</a>/, <a href="http://www.alexbalashov.com/">http://www.alexbalashov.com/</a></body></html>