atomic-decf Portable Threadsatomic-flushatomic-deleteGoTo Top

atomic-delete   item place &key from-end test test-not start end count key => sequence[Macro]

Purpose
As an atomic operation, set place to the sequence in place from which the elements that satisfy the test have been removed.

Package   :portable-threads

Module   :portable-threads

Arguments and values

item     An object
place     A form which is suitable for use as a generalized reference that contains a proper sequence
from-end     A generalized boolean (default is nil)
test     A function designator specifying a function object of two arguments that returns a generalized boolean (default is #'eql)
test-not     A function designator specifying a function object of two arguments that returns a generalized boolean (use of :test-not is deprecated)
start     Starting index into sequence (default is 0)
end     Ending index into sequence (default is nil, meaning end of sequence)
count     An integer or nil (default is nil)
key     A function designator specifying a function object of one argument, or nil (default is nil)
sequence     A sequence

Returns
The sequence in place from which the elements that satisfy the test have been removed.

Description
Replaces place with the sequence in place from which elements that satisfy the test have been deleted. The supplied place sequence may be modified in constructing the result; however, modification of the sequence itself is not guaranteed.

Specifying a from-end value of true matters only when the count is provided, and in that case only the rightmost count elements satisfying the test are deleted.

See also
    as-atomic-operation
    atomic-flush
    atomic-pop
    atomic-push
    atomic-pushnew
    counted-delete
    delq
    delq-one

Example

  > list
  (1 2 3)
  > (atomic-delete 2 list)
  (2 3)
  > list
  (2 3)
  >


The GBBopen Project


atomic-decf Portable Threadsatomic-flushatomic-deleteGoTo Top