PreviousNext

Abandoning Operations

The XDS user can abandon a directory operation when operating in multithreaded mode. An operation is abandoned by calling pthread_cancel( ) to cancel the thread that issued the directory operation. General cancelability must be enabled; otherwise, the cancelability will be ignored.

XDS will react as follows, depending on when the cancel is delivered:

· Before interaction with the DSA

- Nothing is sent to the DSA.

- The exception pthread_cancel_e is reraised.

· While waiting for a response from the DSA

- An ABANDON message is sent to the DSA.

- The exception pthread_cancel_e is reraised.

· After the result has arrived, but before a point has been reached when it is committed to be passed back to the user

- The result is thrown away.

- The exception pthread_cancel_e is reraised.

· After the point where result return is committed place

- The cancel is ignored.

- The result is returned normally.

It is the responsibility of the user to handle the cancel exception in the last case and, if necessary, to discard the result.