You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why doesn't the API follow that of concurrent.futures? The lithops executors are clearly modelled after the executors in that standard library module, but they don't actually follow the API, nor do they inherit from the concurrent.futures.Executor ABC. The lithops future object doesn't inherit from concurrent.futures.Future either.
This matters - in particular the lithops .map() method returns a future whereas the concurrent.futures.map executes eagerly. This means downstream code cannot treat other executors such as concurrent.futures.ThreadPoolExecutor and lithops executors interchangably.
I can understand why you extended the API to add new methods (e.g. .map_reduce()), but why not follow the convention concurrent.futures set for the methods it does define? That standard library module predates this package by many years.
If this difference is intended, it would be nice to note why on the docs page on lithops futures, to avoid other people going down this rabbit hole too.
The text was updated successfully, but these errors were encountered:
Why doesn't the API follow that of
concurrent.futures
? The lithops executors are clearly modelled after the executors in that standard library module, but they don't actually follow the API, nor do they inherit from theconcurrent.futures.Executor
ABC. The lithops future object doesn't inherit fromconcurrent.futures.Future
either.This matters - in particular the lithops
.map()
method returns a future whereas theconcurrent.futures
.map
executes eagerly. This means downstream code cannot treat other executors such asconcurrent.futures.ThreadPoolExecutor
and lithops executors interchangably.I can understand why you extended the API to add new methods (e.g.
.map_reduce()
), but why not follow the conventionconcurrent.futures
set for the methods it does define? That standard library module predates this package by many years.If this difference is intended, it would be nice to note why on the docs page on lithops futures, to avoid other people going down this rabbit hole too.
The text was updated successfully, but these errors were encountered: