6 ms·
> how does threading work? Basic answer: there is no threading, at least not for the user. The build system runs a thread per BUILD file (in bazel). Since the
by vitiral 2y ago
> how does threading work?
Basic answer: there is no threading, at least not for the user.
The build system runs a thread per BUILD file (in bazel). Since the BUILD files are written in starlark and starlark has no threads -- there is no problem.
- laurentlb 2y agoYou can define a value (let's say a dictionary) in a .bzl file and load it from multiple BUILD files. This is safe only because the dictionary becomes immutable before it is shared. Bazel is massively parallel. It has to evaluate a potentially large number of BUILD files; each file can have multiple load statements. You end up with a graph of dependencies and Bazel will evaluate as many files as possible in parallel.