Giter Club home page Giter Club logo

Comments (2)

DavisVaughan avatar DavisVaughan commented on July 29, 2024

Hi @alex-lauer, is it possible you just have a typo? If I take your code and run it in the console line by line I see

> future::plan(multisession, workers = 4)
Error in eval(first, envir = parent.frame(), enclos = baseenv()) : 
  object 'multisession' not found

This is because we didn't load furrr or future completely, so future::multisession() isn't available to us.

Is it possible you just missed that error?

Here is a full reprex that works for me, with typos fixed

library(tictoc)
library(purrr)
library(furrr)
#> Loading required package: future

tic()
x <- map_dbl(1:4, function(x){
  Sys.sleep(1)
  x^2
})
toc()
#> 4.023 sec elapsed

plan(multisession, workers = 4)

tic()
x <- future_map_dbl(1:4, \(x){
  Sys.sleep(1)
  x^2
})
toc()
#> 1.946 sec elapsed

Created on 2023-02-27 with reprex v2.0.2.9000

from furrr.

DavisVaughan avatar DavisVaughan commented on July 29, 2024

Also I encourage you to use the reprex package to create reproducible examples when opening issues! It helps me help you, and often can help you figure out the problem yourself https://reprex.tidyverse.org/articles/learn-reprex.html

from furrr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.