Skip to content

Instantly share code, notes, and snippets.

@kylebaron
Last active August 15, 2016 19:46
Show Gist options
  • Save kylebaron/e821e33324c55351fba3c530c1a680e2 to your computer and use it in GitHub Desktop.
Save kylebaron/e821e33324c55351fba3c530c1a680e2 to your computer and use it in GitHub Desktop.
future
> f <- future({
+ a <- 7
+ b <- 3
+ c <- 2
+ a * b * c
+ })
> as.list(f)
$local
[1] TRUE
$owner
[1] "d24f64a5-dd8e-2c3f-7613-61cf1f1c66f5"
attr(,"info")
attr(,"info")$host
<NA>
NA
attr(,"info")$info
sysname release
"Linux" "3.2.0-39-virtual"
version nodename
"#62-Ubuntu SMP Thu Feb 28 00:48:27 UTC 2013" "ip-10-0-29-230"
machine login
"x86_64" "unknown"
user effective_user
"kyleb" "kyleb"
attr(,"info")$pid
[1] 24083
attr(,"info")$time
[1] "2016-08-15 19:38:57 UTC"
attr(,"info")$random
[1] 174784500
$envir
<environment: R_GlobalEnv>
$workers
[1] 8
$gc
[1] FALSE
$job
$pid
[1] 24462
$fd
[1] 16 25
attr(,"class")
[1] "parallelJob" "childProcess" "process"
$expr
{
a <- 7
b <- 3
c <- 2
a * b * c
}
$earlySignal
[1] FALSE
$state
[1] "running"
@kylebaron
Copy link
Author

kylebaron commented Aug 15, 2016

I'm not sure what that "Globals" thing is.

> f
MulticoreFuture:
Expression:
{
    a <- 7
    b <- 3
    c <- 2
    a * b * c
}
Local evaluation: TRUE
Environment: <environment: R_GlobalEnv>
Globals: <none>
Resolved: TRUE
Value: <not collected>
Early signalling: FALSE
Owner process: d24f64a5-dd8e-2c3f-7613-61cf1f1c66f5
Class:MulticoreFuture’, ‘MultiprocessFuture’, ‘Future’, ‘environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment