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.
This commit is contained in:
Max Brunsfeld 2021-05-21 21:14:21 -07:00
parent e4e5ffe517
commit 0e445c47fa

View file

@ -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 {}