From 0e445c47fa25a6a53ef2f9adf845a25d0d6ea3c9 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 21 May 2021 21:14:21 -0700 Subject: [PATCH] rust: Parser and QueryCursor are Sync These objects are not generally intended to be shared betwen threads, but they meet the Rust definition of Sync: all of their methods are that take a shared reference to `self` are safe to call from multiple threads simultaneously. In other words, there is no interior mutability. --- lib/binding_rust/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/binding_rust/lib.rs b/lib/binding_rust/lib.rs index 771a8433..801f773f 100644 --- a/lib/binding_rust/lib.rs +++ b/lib/binding_rust/lib.rs @@ -1957,5 +1957,7 @@ unsafe impl Send for Query {} unsafe impl Send for QueryCursor {} unsafe impl Send for Tree {} unsafe impl Sync for Language {} +unsafe impl Sync for Parser {} unsafe impl Sync for Query {} +unsafe impl Sync for QueryCursor {} unsafe impl Sync for Tree {}