2626# ' @param timeout [default NULL] integer value in milliseconds or NULL, which
2727# ' applies a socket-specific default, usually the same as no timeout.
2828# '
29- # ' @return A ' sendAio' (object of class ' sendAio' ) (invisibly).
29+ # ' @return A \sQuote{ sendAio} (object of class \sQuote{ sendAio} ) (invisibly).
3030# '
31- # ' @details Async send is always non-blocking and returns a ' sendAio'
31+ # ' @details Async send is always non-blocking and returns a \sQuote{ sendAio}
3232# ' immediately.
3333# '
34- # ' For a ' sendAio' , the send result is available at \code{$result}. An
35- # ' ' unresolved' logical NA is returned if the async operation is yet to
36- # ' complete. The resolved value will be zero on success, or else an integer
37- # ' error code.
34+ # ' For a \sQuote{ sendAio} , the send result is available at \code{$result}.
35+ # ' An \sQuote{ unresolved} logical NA is returned if the async operation is
36+ # ' yet to complete. The resolved value will be zero on success, or else an
37+ # ' integer error code.
3838# '
3939# ' To wait for and check the result of the send operation, use
40- # ' \code{\link{call_aio}} on the returned ' sendAio' object.
40+ # ' \code{\link{call_aio}} on the returned \sQuote{ sendAio} object.
4141# '
4242# ' Alternatively, to stop the async operation, use \code{\link{stop_aio}}.
4343# '
@@ -67,21 +67,22 @@ send_aio <- function(con, data, mode = c("serial", "raw", "next"), timeout = NUL
6767# ' @inheritParams recv
6868# ' @inheritParams send_aio
6969# '
70- # ' @return A ' recvAio' (object of class ' recvAio' ) (invisibly).
70+ # ' @return A \sQuote{ recvAio} (object of class \sQuote{ recvAio} ) (invisibly).
7171# '
72- # ' @details Async receive is always non-blocking and returns a ' recvAio'
72+ # ' @details Async receive is always non-blocking and returns a \sQuote{ recvAio}
7373# ' immediately.
7474# '
75- # ' For a ' recvAio' , the received message is available at \code{$data}. An
76- # ' ' unresolved' logical NA is returned if the async operation is yet to
77- # ' complete.
75+ # ' For a \sQuote{ recvAio} , the received message is available at \code{$data}.
76+ # ' An \sQuote{ unresolved} logical NA is returned if the async operation is
77+ # ' yet to complete.
7878# '
7979# ' To wait for the async operation to complete and retrieve the received
80- # ' message, use \code{\link{call_aio}} on the returned 'recvAio' object.
80+ # ' message, use \code{\link{call_aio}} on the returned \sQuote{recvAio}
81+ # ' object.
8182# '
8283# ' Alternatively, to stop the async operation, use \code{\link{stop_aio}}.
8384# '
84- # ' In case of an error, an integer ' errorValue' is returned (to be
85+ # ' In case of an error, an integer \sQuote{ errorValue} is returned (to be
8586# ' distiguishable from an integer message value). This can be checked using
8687# ' \code{\link{is_error_value}}.
8788# '
@@ -122,16 +123,16 @@ recv_aio <- function(con,
122123
123124# ' Receive Async and Signal a Condition
124125# '
125- # ' A signalling version of the function takes a ' conditionVariable' as an
126+ # ' A signalling version of the function takes a \sQuote{ conditionVariable} as an
126127# ' additional argument and signals it when the async receive is complete.
127128# '
128- # ' @param cv \strong{For the signalling version}: a ' conditionVariable' to
129- # ' signal when the async receive is complete.
129+ # ' @param cv \strong{For the signalling version}: a \sQuote{ conditionVariable}
130+ # ' to signal when the async receive is complete.
130131# '
131132# ' @details \strong{For the signalling version}: when the receive is complete,
132- # ' the supplied ' conditionVariable' is signalled by incrementing its value
133- # ' by 1. This happens asynchronously and independently of the R execution
134- # ' thread.
133+ # ' the supplied \sQuote{ conditionVariable} is signalled by incrementing its
134+ # ' value by 1. This happens asynchronously and independently of the R
135+ # ' execution thread.
135136# '
136137# ' @examples
137138# ' # Signalling a condition variable
@@ -166,34 +167,38 @@ recv_aio_signal <- function(con,
166167# ' \code{call_aio} retrieves the value of an asynchronous Aio operation, waiting
167168# ' for the operation to complete if still in progress.
168169# '
169- # ' @param aio an Aio (object of class 'sendAio', 'recvAio' or 'ncurlAio').
170+ # ' @param aio an Aio (object of class \sQuote{sendAio}, \sQuote{recvAio} or
171+ # ' \sQuote{ncurlAio}).
170172# '
171173# ' @return The passed object (invisibly).
172174# '
173- # ' @details For a 'recvAio', the received value may be retrieved at \code{$data}.
175+ # ' @details For a \sQuote{recvAio}, the received value may be retrieved at
176+ # ' \code{$data}.
174177# '
175- # ' For a 'sendAio', the send result may be retrieved at \code{$result}. This
176- # ' will be zero on success, or else an integer error code.
178+ # ' For a \sQuote{sendAio}, the send result may be retrieved at
179+ # ' \code{$result}. This will be zero on success, or else an integer error
180+ # ' code.
177181# '
178- # ' To access the values directly, use for example on a 'recvAio' \code{x}:
179- # ' \code{call_aio(x)$data}.
182+ # ' To access the values directly, use for example on a \sQuote{recvAio}
183+ # ' \code{x}: \code{ call_aio(x)$data}.
180184# '
181- # ' For a ' recvAio' , if an error occurred in unserialization or conversion of
182- # ' the message data to the specified mode, a raw vector will be returned
183- # ' instead to allow recovery (accompanied by a warning).
185+ # ' For a \sQuote{ recvAio} , if an error occurred in unserialization or
186+ # ' conversion of the message data to the specified mode, a raw vector will
187+ # ' be returned instead to allow recovery (accompanied by a warning).
184188# '
185189# ' Once the value has been successfully retrieved, the Aio is deallocated
186190# ' and only the value is stored in the Aio object.
187191# '
188- # ' Note this function operates silently and does not error even if 'aio' is
189- # ' not an active Aio, always returning invisibly the passed object.
192+ # ' Note this function operates silently and does not error even if
193+ # ' \sQuote{aio} is not an active Aio, always returning invisibly the passed
194+ # ' object.
190195# '
191196# ' @section Alternatively:
192197# '
193- # ' Aio values may be accessed directly at \code{$result} for a 'sendAio',
194- # ' and \code{$data} for a ' recvAio' . If the Aio operation is yet to complete,
195- # ' an ' unresolved' logical NA will be returned. Once complete, the resolved
196- # ' value will be returned instead.
198+ # ' Aio values may be accessed directly at \code{$result} for a
199+ # ' \sQuote{sendAio}, and \code{$data} for a \sQuote{ recvAio} . If the Aio
200+ # ' operation is yet to complete, an \sQuote{ unresolved} logical NA will be
201+ # ' returned. Once complete, the resolved value will be returned instead.
197202# '
198203# ' \code{\link{unresolved}} may also be used, which returns TRUE only if an
199204# ' Aio or Aio value has yet to resolve and FALSE otherwise. This is suitable
@@ -237,14 +242,14 @@ call_aio_ <- function(aio) invisible(.Call(rnng_wait_thread_create, aio))
237242# '
238243# ' @return Invisible NULL.
239244# '
240- # ' @details Stops the asynchronous I/O operation associated with ' aio' by
245+ # ' @details Stops the asynchronous I/O operation associated with \sQuote{ aio} by
241246# ' aborting, and then waits for it to complete or to be completely aborted,
242- # ' and for the callback associated with the ' aio' to have completed
243- # ' executing. If successful, the ' aio' will resolve to an 'errorValue' 20
244- # ' (Operation canceled).
247+ # ' and for the callback associated with the \sQuote{ aio} to have completed
248+ # ' executing. If successful, the \sQuote{ aio} will resolve to an
249+ # ' \sQuote{errorValue} 20 (Operation canceled).
245250# '
246- # ' Note this function operates silently and does not error even if 'aio' is
247- # ' not an active Aio, always returning invisible NULL.
251+ # ' Note this function operates silently and does not error even if
252+ # ' \sQuote{aio} is not an active Aio, always returning invisible NULL.
248253# '
249254# ' @export
250255# '
@@ -255,16 +260,17 @@ stop_aio <- function(aio) invisible(.Call(rnng_aio_stop, aio))
255260# ' Query whether an Aio or Aio value remains unresolved. Unlike
256261# ' \code{\link{call_aio}}, this function does not wait for completion.
257262# '
258- # ' @param aio an Aio (object of class ' sendAio' or ' recvAio' ), or Aio value
259- # ' stored in \code{$result} or \code{$data} as the case may be.
263+ # ' @param aio an Aio (object of class \sQuote{ sendAio} or \sQuote{ recvAio} ), or
264+ # ' Aio value stored in \code{$result} or \code{$data} as the case may be.
260265# '
261- # ' @return Logical TRUE if ' aio' is an unresolved Aio or Aio value, or FALSE
262- # ' otherwise.
266+ # ' @return Logical TRUE if \sQuote{ aio} is an unresolved Aio or Aio value, or
267+ # ' FALSE otherwise.
263268# '
264269# ' @details Suitable for use in control flow statements such as \code{while} or
265270# ' \code{if}.
266271# '
267- # ' Note: querying resolution may cause a previously unresolved Aio to resolve.
272+ # ' Note: querying resolution may cause a previously unresolved Aio to
273+ # ' resolve.
268274# '
269275# ' @examples
270276# ' s1 <- socket("pair", listen = "inproc://nanonext")
@@ -292,11 +298,11 @@ unresolved <- function(aio) .Call(rnng_unresolved, aio)
292298# ' altering its state in any way i.e. not attempting to retrieve the result
293299# ' or message.
294300# '
295- # ' @param aio an Aio (object of class ' sendAio' or ' recvAio' ).
301+ # ' @param aio an Aio (object of class \sQuote{ sendAio} or \sQuote{ recvAio} ).
296302# '
297- # ' @return Logical TRUE if ' aio' is an unresolved Aio, or FALSE otherwise.
303+ # ' @return Logical TRUE if \sQuote{ aio} is an unresolved Aio, or FALSE otherwise.
298304# '
299- # ' @details \code{.unresolved()} is not intended to be used for ' recvAio'
305+ # ' @details \code{.unresolved()} is not intended to be used for \sQuote{ recvAio}
300306# ' returned by a signalling function, in which case \code{\link{unresolved}}
301307# ' must be used in all cases.
302308# '
0 commit comments