All Methods Instance Methods Abstract Methods Modifier and Type Method Description
transferOwnership(Drop<T> drop)Transfer the ownership of the resource, to the calling thread.
T transferOwnership(Drop<T> drop)Transfer the ownership of the resource, to the calling thread. The resource instance is invalidated but without disposing of its internal state. Then a new resource instance with the given owner is produced in its stead.
This method is called by
Sendimplementations. These implementations will ensure that the transfer of ownership (the calling of this method) happens-before the new owner begins accessing the new object. This ensures that the new resource instance is safely published to the new owners.
drop- The drop object that knows how to dispose of the state represented by this
- A new resource instance that is exactly the same as this resource.