thomasp85 / fiery

A flexible and lightweight web server
https://fiery.data-imaginist.com
Other
243 stars 12 forks source link

resolved() operates on futures rather than expressions #1

Closed HenrikBengtsson closed 8 years ago

HenrikBengtsson commented 8 years ago

(from my Twitter comment):

In https://github.com/thomasp85/fiery/blob/master/R/FutureStack.R#L59, if private$futures[[id]] is a future (Future object created by future()) then I think

resolved(private$futures[[id]]$expr, timeout = 0.05)

should be

resolved(private$futures[[id]], timeout = 0.05)

because resolved() operates on a single future, a list or environment of them.

thomasp85 commented 8 years ago

This is bad naming on my part. private$futures contains lists. Each list encapsulates a future, a then function etc. The future is stored in expr. I should probably rename to make it clearer

HenrikBengtsson commented 8 years ago

I see. Now it makes sense. Sorry about the noise.