Struct mpi::request::Request
[−]
[src]
#[must_use]pub struct Request<'a, S: Scope<'a>> { /* fields omitted */ }
A request object for a non-blocking operation registered with a Scope
of lifetime 'a
The Scope
is needed to ensure that all buffers associated request will outlive the request
itself, even if the destructor of the request fails to run.
Panics
Panics if the request object is dropped. To prevent this, call wait
, wait_without_status
,
or test
. Alternatively, wrap the request inside a WaitGuard
or CancelGuard
.
Examples
See examples/immediate.rs
Standard section(s)
3.7.1
Methods
impl<'a, S: Scope<'a>> Request<'a, S>
[src]
pub unsafe fn from_raw(request: MPI_Request, scope: S) -> Self
[src]
Construct a request object from the raw MPI type.
Requirements
- The request is a valid, active request. It must not be
MPI_REQUEST_NULL
. - The request must not be persistent.
- All buffers associated with the request must outlive
'a
. - The request must not be registered with the given scope.
pub unsafe fn into_raw(self) -> (MPI_Request, S)
[src]
Unregister the request object from its scope and deconstruct it into its raw parts.
This is unsafe because the request may outlive its associated buffers.
pub fn wait(self) -> Status
[src]
Wait for an operation to finish.
Will block execution of the calling thread until the associated operation has finished.
Examples
See examples/immediate.rs
Standard section(s)
3.7.3
pub fn wait_without_status(self)
[src]
Wait for an operation to finish, but don’t bother retrieving the Status
information.
Will block execution of the calling thread until the associated operation has finished.
Standard section(s)
3.7.3
pub fn test(self) -> Result<Status, Self>
[src]
Test whether an operation has finished.
If the operation has finished, Status
is returned. Otherwise returns the unfinished
Request
.
Examples
See examples/immediate.rs
Standard section(s)
3.7.3
pub fn cancel(&self)
[src]
Initiate cancellation of the request.
The MPI implementation is not guaranteed to fulfill this operation. It may not even be valid for certain types of requests. In the future, the MPI forum may deprecate cancellation of sends entirely.
Examples
See examples/immediate.rs
Standard section(s)
3.8.4
pub fn shrink_scope_to<'b, S2>(self, scope: S2) -> Request<'b, S2> where
'a: 'b,
S2: Scope<'b>,
[src]
'a: 'b,
S2: Scope<'b>,
Reduce the scope of a request.
Trait Implementations
impl<'a, S: Debug + Scope<'a>> Debug for Request<'a, S>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more