mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 13:10:19 +00:00
eca8bad6e9
352: Add options to tracked funcitons for lru capacity r=nikomatsakis a=XFFXFF fixes #344 Now we can write something like the following to set the lru capacity of tracked functions ```rust #[salsa::tracked(lru=32)] fn my_tracked_fn(db: &dyn crate::Db, ...) { } ``` some details: * lru should not be combined with specify. We will report an error if people do #[salsa::tracked(lru = 32, specify)] * set 0 as default capacity to disable LRU (Because I think doing this would make the code simpler when implementing `create_ingredients` of tracked functions). * old salsa support to change lru capacity at runtime, [as noted here](https://salsa-rs.github.io/salsa/rfcs/RFC0004-LRU.html?highlight=change#reference-guide), but we do not support this now Co-authored-by: XFFXFF <1247714429@qq.com> |
||
---|---|---|
.. | ||
parallel | ||
accumulate-from-tracked-fn.rs | ||
accumulate-reuse-workaround.rs | ||
accumulate-reuse.rs | ||
accumulate.rs | ||
cycles.rs | ||
deletion-cascade.rs | ||
deletion.rs | ||
expect_reuse_field_x_of_a_tracked_struct_changes_but_fn_deponds_on_field_y.rs | ||
expect_reuse_field_x_of_an_input_changes_but_fn_deponds_on_field_y.rs | ||
hello_world.rs | ||
lru.rs | ||
mutate_in_place.rs | ||
specify_tracked_fn_in_rev_1_but_not_2.rs | ||
tracked_fn_on_input.rs | ||
tracked_fn_on_tracked.rs | ||
tracked_fn_on_tracked_specify.rs | ||
tracked_fn_read_own_entity.rs |