Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-08-09 12:31:14 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-08-09 12:32:16 +0300
commit0986992dbd0d85363f86079a7390632df9cb9d20 (patch)
tree802fc06ecae0b9cbde046964cb45c9088d2f34d0 /source
parent909e0819ae939a8054bea2c9dcf389232744f3ae (diff)
Cleanup: document `FileListReadJob::tmp_filelist`
Add a comment to document what `FileListReadJob::tmp_filelist` is for, and how it's freed. No functional changes.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_file/filelist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 4eb58642bba..fae28269349 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -3354,7 +3354,14 @@ typedef struct FileListReadJob {
char main_name[FILE_MAX];
Main *current_main;
struct FileList *filelist;
- /** XXX We may use a simpler struct here... just a linked list and root path? */
+
+ /** Shallow copy of #filelist for thread-safe access.
+ *
+ * The job system calls #filelist_readjob_update which moves any read file from #tmp_filelist
+ * into #filelist in a thread-safe way.
+ *
+ * NOTE: #tmp_filelist is freed in #filelist_readjob_free, so any copied pointers need to be set
+ * to NULL to avoid double-freeing them. */
struct FileList *tmp_filelist;
} FileListReadJob;