Make Span and Symbol implement Send and Sync
This commit is contained in:
parent
f53d4af223
commit
3fa69c935d
2 changed files with 10 additions and 2 deletions
|
@ -184,8 +184,12 @@ impl SpanData {
|
|||
}
|
||||
}
|
||||
|
||||
// The interner in thread-local, so `Span` shouldn't move between threads.
|
||||
// The interner is pointed to by a thread local value which is only set on the main thread
|
||||
// with parallelization is disabled. So we don't allow Span to transfer between threads
|
||||
// to avoid panics and other errors, even though it would be memory safe to do so.
|
||||
#[cfg(not(parallel_queries))]
|
||||
impl !Send for Span {}
|
||||
#[cfg(not(parallel_queries))]
|
||||
impl !Sync for Span {}
|
||||
|
||||
impl PartialOrd for Span {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue