Auto merge of #14351 - asajeffrey:servo-rand-share-fds, r=emilio

An in-memory RNG that shares its file descriptor.

<!-- Please describe your changes on the following line: -->

This PR implements an in-memory random number generator that only uses an OS RNG for (re)seeding. The OS RNG is shared, so there's only one file descriptor for `/dev/urandom` being used.

The PR also implements a tidy check that we don't accidentally introduce an RNG. Rather annoyingly, there are a lot of transitive dependencies on `rand`, notably hash maps in `std`.

This PR makes it possible to use uuids for identifiers such as pipeline and frame ids.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's fixing a resource issue

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14351)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-05 06:32:23 -08:00 committed by GitHub
commit 36ddf763f6
16 changed files with 238 additions and 23 deletions

View file

@ -44,7 +44,6 @@ owning_ref = "0.2.2"
parking_lot = "0.3.3"
phf = "0.7.20"
quickersort = "2.0.0"
rand = "0.3"
rayon = "0.6"
rustc-serialize = "0.3"
selectors = "0.15"