Nsv incr
Jump to navigation
Jump to search
Man page: http://aolserver.com/docs/tcl/nsv_incr.html
NAME
- nsv_incr - Increment the value of the element in the nsv array arrayName specified by key
SYNOPSIS
- nsv_incr arrayName key ?increment?
DESCRIPTION
- If increment is supplied then its value (which must be an integer) is added to the value of the element key; otherwise 1 is added to the value of the element key. Unlike the TCL equivalent if key does not exists it is created. Returns the new value of the element specified by key. Internally interlocked so it is thread safe, no mutex required.
EXAMPLES
% nsv_incr shared_array foo 1 % nsv_incr shared_array foo -1 0
SEE ALSO