On Wed, 23 Oct 2013, Rainer Gerhards wrote:
Let me elaborate a bit more. Obviously, the problems with state variables
occur only when they are update. If they were read-only, no problem would
ever exist. But for some reason it makes very limited sense to have
read-only state ;) So this would be too hard an restriction.
actually, even multiple reads of a state variable could cause grief
the load balanceing approach of
if $/g % 2 == 0 then action1
if $/g % 2 == 1 then action2
may not end up executing either action if some other thread modified $/g in the
process.
David Lang
Thinking along these lines, I wonder if things become easier if we at least
limit the number of updates.
One other restriction in this regard is
A state variable cannot be modified after it has been accessed.
Note that this is a far stricter restriction that "cannot be modified after
it has been modified". It would make it impossible to write my above sample
without the help of a specific atomic function, but it would still permit
set $/z = $/z +1
write $/z
which would not be permitted if we say "cannot be accessed more than once".
How about that restriction?
Rainer
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.