Use atomic operations for updating syntax tree reference counts

Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
This commit is contained in:
Max Brunsfeld 2018-05-09 17:30:13 -07:00
parent 666dfb76d2
commit 78d158899e
3 changed files with 34 additions and 4 deletions

View file

@ -29,7 +29,7 @@ typedef Array(Tree *) TreeArray;
struct Tree {
Length padding;
Length size;
uint32_t ref_count;
volatile uint32_t ref_count;
uint32_t bytes_scanned;
uint32_t error_cost;
uint32_t node_count;