Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Fork/R/fork.r
Normal file
16
Task/Fork/R/fork.r
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
p <- parallel::mcparallel({
|
||||
Sys.sleep(1)
|
||||
cat("\tChild pid: ", Sys.getpid(), "\n")
|
||||
TRUE
|
||||
})
|
||||
cat("Main pid: ", Sys.getpid(), "\n")
|
||||
parallel::mccollect(p)
|
||||
|
||||
p <- parallel:::mcfork()
|
||||
if (inherits(p, "masterProcess")) {
|
||||
Sys.sleep(1)
|
||||
cat("\tChild pid: ", Sys.getpid(), "\n")
|
||||
parallel:::mcexit(, TRUE)
|
||||
}
|
||||
cat("Main pid: ", Sys.getpid(), "\n")
|
||||
unserialize(parallel:::readChildren(2))
|
||||
Loading…
Add table
Add a link
Reference in a new issue