Skip to content

Fix typo #635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/queries/query-evaluation-model-in-detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ would still exist and already executed queries would not have to be re-done.
## Cycles

Earlier we stated that query invocations form a DAG. However, it would be easy
form a cyclic graph by, for example, having a query provider like the following:
to form a cyclic graph by, for example, having a query provider like the
following:

```rust,ignore
fn cyclic_query_provider(tcx, key) -> u32 {
Expand Down Expand Up @@ -225,7 +226,7 @@ The nightly compiler already implements parallel query evaluation as follows:

When a query `foo` is evaluated, the cache table for `foo` is locked.

- If there already is a result, we can clone it,release the lock and
- If there already is a result, we can clone it, release the lock and
we are done.
- If there is no cache entry and no other active query invocation computing the
same result, we mark the key as being "in progress", release the lock and
Expand All @@ -235,4 +236,3 @@ When a query `foo` is evaluated, the cache table for `foo` is locked.
computed the result we are waiting for. This cannot deadlock because, as
mentioned before, query invocations form a DAG. Some thread will always make
progress.