summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyqsimon <28627918+cyqsimon@users.noreply.github.com>2024-02-26 11:31:30 +0800
committercyqsimon <28627918+cyqsimon@users.noreply.github.com>2024-02-26 11:31:30 +0800
commit26ac1795484f1a8242c180919da95d6cf841da7c (patch)
tree07979b0c96d6e2d4a7ac9cbc5e997eeea90468e2
parentc7bce466221a093c2ee0ff21eec07841f7692077 (diff)
Add note on thread synchronization
-rw-r--r--src/syntax_mapping.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs
index 7c96c513..a149f9bb 100644
--- a/src/syntax_mapping.rs
+++ b/src/syntax_mapping.rs
@@ -89,6 +89,11 @@ impl<'a> SyntaxMapping<'a> {
Lazy::force(matcher);
}
});
+ // Note that this thread is not joined upon completion because there's
+ // no shared resources that need synchronization to be safely dropped.
+ // If we later add code into this thread that requires interesting
+ // resources (e.g. IO), it would be a good idea to store the handle
+ // and join it on drop.
}
pub fn insert(&mut self, from: &str, to: MappingTarget<'a>) -> Result<()> {