-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix threading issue when accessing user instance in _get_codes of Com…
…putationalResourceWidgets (#543) fixes aiidalab/aiidalab-qe#582 The _get_codes method is used in the multi-threading case by QEapp, and causes the issue. The error comes from we use `user.collection.get_default` which will return the same object which is not thread-safe. The workaround is to get the user by email (which is the unique index for user) with using `user.collectio.get(email=<emaill>)` which will return a new object.
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters