@@ -287,30 +287,32 @@ call_mirai_ <- call_aio_
287
287
# '
288
288
# ' @return Invisible NULL.
289
289
# '
290
- # ' @details Forces the mirai to resolve immediately. If the asynchronous
291
- # ' evaluation was not yet complete, attempting to access its value at
292
- # ' \code{$data} will return a 'miraiInterrupt' (see
293
- # ' \code{\link{is_mirai_interrupt}}).
290
+ # ' @details Forces the mirai to resolve immediately.
294
291
# '
295
- # ' Note that in this case, it is only guaranteed that the mirai value is not
296
- # ' returned - any ongoing evaluation in the daemon process will continue and
297
- # ' is not interrupted.
292
+ # ' If the asynchronous evaluation is yet to complete, the value at
293
+ # ' \code{$data} will resolve to a 'miraiInterrupt' (see
294
+ # ' \code{\link{is_mirai_interrupt}}). Note that in such a case, it is only
295
+ # ' guaranteed that the mirai is aborted and the value not retrieved - any
296
+ # ' ongoing evaluation in the daemon process will continue and is not
297
+ # ' interrupted.
298
298
# '
299
299
# ' @examples
300
300
# ' if (interactive()) {
301
301
# ' # Only run examples in interactive R sessions
302
302
# '
303
303
# ' s <- mirai(Sys.sleep(n), n = 5)
304
304
# ' stop_mirai(s)
305
+ # ' s$data
305
306
# '
306
307
# ' }
307
308
# '
308
309
# ' @export
309
310
# '
310
- stop_mirai <- function (aio ) if (unresolved(aio )) {
311
- assign(" value" , mk_interrupt_error(), envir = aio )
312
- stop_aio(aio )
313
- }
311
+ stop_mirai <- function (aio )
312
+ if (unresolved(aio )) {
313
+ assign(" value" , mk_interrupt_error(), envir = aio )
314
+ stop_aio(aio )
315
+ }
314
316
315
317
# ' Query if a mirai is Unresolved
316
318
# '
0 commit comments