23.10.2013 14:44, Rainer Gerhards:
But so to get more concrete, if you prefer: would it be OK if a state
variable could be accessed only once? Or would it cause trouble? Maybe I am
asking about the relaxed form because we already know that one-time access
gives us trouble: there would be no obvious solution for my example above
other than creating a specific sequence() function (what of course is a
solution, but the question is: can we get along with a less intrusive
approch)?
So I am just trying to find some limits. As I said, after that I'd like to
think about actual implementation.
Obviously YES, some things will be impossimble, if we set some
restriction. Your proposed restriction on writes does not break any use
case, thus it is not a restriction at all. In general:
If you have some sequence of statements, where a variable is set several
times, then you can always replace all occurences of the variable,
starting from the first set, to some temporary variable. And then write
it's contents to the restricted variable.
What use cases will break, if stronger restriction apply? I've just
mentioned one of them two letters ago in P.S. Generally, we forbid all
read-evaluate-write sequences for the variable. If they are needed, they
can be done using new atomic operations. So yes, for counter we still
need atomic_inc, etc.
More to follow...
--
Pavel Levshin
_______________________________________________
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.