| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/aio.R |
| 3 |
\name{unresolved} |
| 4 |
\alias{unresolved} |
| 5 |
\title{Query if an Aio is Unresolved} |
| 6 |
\usage{ |
| 7 |
unresolved(x) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{an Aio or list of Aios (objects of class 'sendAio', 'recvAio' or |
| 11 |
'ncurlAio'), or Aio value stored at \verb{$result} or \verb{$data} etc.} |
| 12 |
} |
| 13 |
\value{ |
| 14 |
Logical \code{TRUE} if \code{x} is an unresolved Aio or Aio value or the list |
| 15 |
of Aios contains at least one unresolved Aio, or \code{FALSE} otherwise. |
| 16 |
} |
| 17 |
\description{ |
| 18 |
Query whether an Aio, Aio value or list of Aios remains unresolved. Unlike |
| 19 |
\code{\link[=call_aio]{call_aio()}}, this function does not wait for completion. |
| 20 |
} |
| 21 |
\details{ |
| 22 |
Suitable for use in control flow statements such as \code{while} or \code{if}. |
| 23 |
|
| 24 |
Note: querying resolution may cause a previously unresolved Aio to resolve. |
| 25 |
} |
| 26 |
\examples{ |
| 27 |
s1 <- socket("pair", listen = "inproc://nanonext") |
| 28 |
aio <- send_aio(s1, "test", timeout = 100) |
| 29 |
|
| 30 |
while (unresolved(aio)) { |
| 31 |
# do stuff before checking resolution again |
| 32 |
cat("unresolved\n") |
| 33 |
msleep(100) |
| 34 |
} |
| 35 |
|
| 36 |
unresolved(aio) |
| 37 |
|
| 38 |
close(s1) |
| 39 |
|
| 40 |
} |