]> git.lizzy.rs Git - rust.git/commit
Auto merge of #51060 - michaelwoerister:thread-safe-consts, r=Zoxc
authorbors <bors@rust-lang.org>
Fri, 1 Jun 2018 08:46:38 +0000 (08:46 +0000)
committerbors <bors@rust-lang.org>
Fri, 1 Jun 2018 08:46:38 +0000 (08:46 +0000)
commit441290291fc71dbfa16a372636a59da75649eece
treeb11bb92bd1325e4bf07bb59145d8c098f0a5df35
parent1dcda69586d72d13c3e7815393c3c16b2b880d48
parent12e83599566e5b40a7f8fdbe0fd9fdbc7ddd2e75
Auto merge of #51060 - michaelwoerister:thread-safe-consts, r=Zoxc

Make const decoding thread-safe.

This is an alternative to https://github.com/rust-lang/rust/pull/50957. It's a proof of concept (e.g. it doesn't adapt metadata decoding, just the incr. comp. cache) but I think it turned out nice. It's rather simple and does not require passing around a bunch of weird closures, like we currently do.

If you (@Zoxc & @oli-obk) think this approach is good then I'm happy to finish and clean this up.

Note: The current version just spins when it encounters an in-progress decoding. I don't have a strong preference for this approach. Decoding concurrently is equally fine by me (or maybe even better because it doesn't require poisoning).

r? @Zoxc