Skip to content

Commit

Permalink
Add comment about MultiThreadedComments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Aug 6, 2021
1 parent 4e104bb commit 7152928
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/ast/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use swc_common::comments::SingleThreadedComments;
use swc_common::comments::SingleThreadedCommentsMapInner;
use swc_common::BytePos;

/// An implementation of swc's `Comments` that implements `Sync`
/// to support being used in multi-threaded code. This implementation
/// is immutable and should you need mutability you may create a copy
/// by converting it to an swc `SingleThreadedComments`.
#[derive(Clone, Debug)]
pub struct MultiThreadedComments {
leading: Arc<SingleThreadedCommentsMapInner>,
Expand Down

0 comments on commit 7152928

Please sign in to comment.