Commit graph

174 commits

Author SHA1 Message Date
Niko Matsakis
29831a7430 remove ErrorDetected variant from ProbeState 2018-10-15 09:31:25 -04:00
Niko Matsakis
a8fd113636 merge read_probe and probe 2018-10-15 09:30:08 -04:00
Niko Matsakis
be983aacdf extract read_upgrade into a separate helper
And use it from `maybe_changed_since` where it makes sense.
2018-10-15 08:53:52 -04:00
Niko Matsakis
2ba9c97815 rewrite to thread a Vec<Receiver> to signal waiters
This is both more precise and the logic is simpler.
2018-10-15 08:28:55 -04:00
Niko Matsakis
373e1158f3 only acquire a read-lock when verifying inputs
We no longer use a placeholder.
2018-10-15 05:32:24 -04:00
Niko Matsakis
1799e12aa4 more debug! when executing from inputs 2018-10-15 05:25:05 -04:00
Niko Matsakis
04288dadef track whether a query is in progress more accurately 2018-10-15 05:24:36 -04:00
Niko Matsakis
9d60b1e1cd make query-descriptor-set cheaply cloneable 2018-10-14 20:15:27 -04:00
Niko Matsakis
2359d8aa0c add a test of computing sum("abc") twice in parallel 2018-10-14 14:58:31 -04:00
Niko Matsakis
d2c3025009 refactor probe to be more generic 2018-10-14 07:23:38 -04:00
Niko Matsakis
be08029f8c [WIP] introduce blocking/notification 2018-10-14 06:59:43 -04:00
Niko Matsakis
da94299f19 [WIP] restructure to handle blocking (which we do not yet initiate) 2018-10-13 06:28:05 -04:00
Niko Matsakis
975eaf58d7 change InProgress to a struct form 2018-10-13 06:08:29 -04:00
Niko Matsakis
ea0b196a5d [WIP] await_other_guard fn 2018-10-13 06:04:57 -04:00
Niko Matsakis
00c76be635 refactor derived read to only require read lock
The old setup acquired `upgradable_read` even when the value was cached.
At that point you might as well just a mutex.
2018-10-13 05:45:57 -04:00
Niko Matsakis
3318921717 show that executing queries on distinct keys can proceed in parallel 2018-10-13 05:45:28 -04:00
Niko Matsakis
e9fadfcfe7 add more knobs, and refactor to make that easier 2018-10-13 05:39:51 -04:00
Niko Matsakis
8da63ec029 move distinct tests into their own files to ease reading 2018-10-13 05:27:20 -04:00
Niko Matsakis
fb5ba07290 move the test setup in setup.rs 2018-10-13 05:22:38 -04:00
Niko Matsakis
8f03f3bb76 move parallel tests into a directory 2018-10-13 05:03:34 -04:00
Niko Matsakis
a0e14e1806 runtime: dependency graph (wip) 2018-10-12 13:41:55 -04:00
Niko Matsakis
ca329ddd10 store the runtime-id in the InProgress indicator 2018-10-12 12:11:49 -04:00
Niko Matsakis
36f72c0b58 give each forked runtime a unique id 2018-10-12 12:11:49 -04:00
Niko Matsakis
e7e9c1bebb rename revision_lock to query_lock and update comments 2018-10-12 12:11:49 -04:00
Niko Matsakis
68015738a5 add parallel tests that show cancellation, racing threads 2018-10-12 12:11:37 -04:00
Niko Matsakis
4f4676df60 remove a bunch of unused imports 2018-10-12 11:21:40 -04:00
Niko Matsakis
be62e8c7a1 add runtime log 2018-10-12 11:21:40 -04:00
Niko Matsakis
890207346f do not hold input write lock while incrementing revision 2018-10-12 05:28:17 -04:00
Niko Matsakis
d11a15aff9 add debugging methods on input::set 2018-10-12 05:27:42 -04:00
Niko Matsakis
f7d6ebe76a introduce a ParallelDatabase trait 2018-10-11 20:22:38 -04:00
Niko Matsakis
c6f78d5f27 have queries freeze the revision 2018-10-11 16:48:20 -04:00
Niko Matsakis
41b36da054 tracking pending increments and add is_current_revision_canceled 2018-10-11 08:37:15 -04:00
Niko Matsakis
4a8b264b7f add a revision lock 2018-10-11 08:18:16 -04:00
Niko Matsakis
12deacbbb5
Merge pull request #45 from nikomatsakis/constants
Constants
2018-10-11 08:07:57 -04:00
Niko Matsakis
a353ffb13c add back implied outlives bounds
Those were reverted on beta.
2018-10-11 05:49:05 -04:00
Niko Matsakis
a0c983403d add some tests about setting with same value 2018-10-11 05:49:05 -04:00
Niko Matsakis
5e381f314b add test where we become constant but do not change value 2018-10-11 04:56:34 -04:00
Niko Matsakis
6778898a34 track when a value *became* constant
Turns out we need this, as demonstrated by the included test =)
2018-10-11 04:53:49 -04:00
Niko Matsakis
efa8b0f307 add some simple tests using is_constant 2018-10-11 04:53:24 -04:00
Niko Matsakis
16d151e4c8 add debugging APIs -- just is_constant for now 2018-10-11 04:37:29 -04:00
Niko Matsakis
15faf43071 add some tests for constants (check for invalidation) 2018-10-09 20:49:26 -04:00
Niko Matsakis
42b88fe7e6 rewrite map to just grab a write lock, and fix some latent bugs 2018-10-09 20:36:29 -04:00
Niko Matsakis
a7317084dc support set_constant in inputs
FIXME: Need test for the `panic!` case etc
2018-10-09 20:36:29 -04:00
Niko Matsakis
032b269113 extract a set_common helper 2018-10-09 20:36:29 -04:00
Niko Matsakis
1afca5d505 add a Constant for ChangedAt 2018-10-09 20:36:29 -04:00
Niko Matsakis
3ffd166f2c check if input has changed before incrementing revision
WIP -- needs test
2018-10-09 20:36:29 -04:00
Niko Matsakis
6a0ed30d73 rename MutQueryStorageOps to InputQueryStorageOps 2018-10-09 20:36:29 -04:00
Niko Matsakis
bf44ef35d4
Merge pull request #44 from matklad/beta
Switch to beta from nightly
2018-10-09 18:03:19 -04:00
Niko Matsakis
a45d482a97
more descriptive assertion failure for overflow 2018-10-09 18:00:27 -04:00
Aleksey Kladov
e42c68913e check revision for overflow 2018-10-10 00:48:19 +03:00