Use local mutexes rather than a global one for the dependency insertion

This commit is contained in:
gingerBill
2023-01-02 19:39:35 +00:00
parent 1568971732
commit 0d87b2e8db
2 changed files with 11 additions and 30 deletions
+5 -6
View File
@@ -179,8 +179,12 @@ struct DeclInfo {
CommentGroup *comment;
CommentGroup *docs;
PtrSet<Entity *> deps;
BlockingMutex deps_mutex;
PtrSet<Entity *> deps;
BlockingMutex type_info_deps_mutex;
PtrSet<Type *> type_info_deps;
Array<BlockLabel> labels;
};
@@ -375,11 +379,6 @@ struct CheckerInfo {
BlockingMutex foreign_mutex; // NOT recursive
StringMap<Entity *> foreigns;
// only used by 'odin query'
bool allow_identifier_uses;
BlockingMutex identifier_uses_mutex;
Array<Ast *> identifier_uses;
// NOTE(bill): These are actually MPSC queues
// TODO(bill): Convert them to be MPSC queues
MPMCQueue<Entity *> definition_queue;