Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wait, if I do (in any language)

  foo = createFuture(1)
  bar = createFuture(2)
  foo.poll()
  bar.poll()
I would expect them to start doing work before polled, otherwise there'd be no concurrency. Do I undsrstand you correctly about polling?


You didn’t say what you understood, but nothing would happen until poll is called in Rust. And calling poll would only result in one churn of the event loop. You don’t call poll yourself, you put the future onto an event loop and it calls poll for you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: