MichaReiser/parallel.es

Add support for incremental Scope

MichaReiser opened this issue · 0 comments

It's hard to determine the end of a parallel chain in the static code rewriter. This makes it difficult to call inEnvironment at the appropriate time. Besides, user calls to inEnvironment may conflict with added calls from the rewriter resulting in not well defined parallel chains --- that results in runtime errors.

Therefore, the api should be redefined to guarantee a safe usage of inEnvironment and the static code rewriter together.

  • Add support to define an environment provider and environment
  • inEnvironment for an object hash does not replace the environment, instead it merges the current environment with the givne one
  • The result of the provider and static environment is merged in the worker, the values from the provider have a higher precedence then the one of the static environments.