make event generation lazy

Creating events if nobody is listening has
always bugged me.
This commit is contained in:
Niko Matsakis 2024-07-27 11:47:58 +00:00
parent 1842b1dfbb
commit 64556e9d28
21 changed files with 37 additions and 24 deletions

View file

@ -32,7 +32,7 @@ where
tracing::info!("{:?}: executing query", database_key_index);
db.salsa_event(Event {
db.salsa_event(&|| Event {
thread_id: std::thread::current().id(),
kind: EventKind::WillExecute {
database_key: database_key_index,