Object invocation may be carried out by one thread in a service which may
include multiple executing threads. In a mechanism for implementing a
cancellation operation in a cooperative system, a thread identifies an
operation to be cancelled. A cancel function has an argument comprising
the thread identifier in which the operation is to be cancelled. The
cancel function is called by a client process thread to cancel a pending
object invocation initiated by the client process. An immediate or hard
cancel causes the targeted client and cancel thread to return
immediately. A discretionary or soft cancel does not affect the targeted
client thread. In either case the server process is notified via a
maintenance notification. The target thread of the cancel cannot be
reused for other work until the cancel request or notification has
returned.