Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • thunar thunar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 328
    • Issues 328
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XfceXfce
  • thunarthunar
  • Merge requests
  • !264

ThunarFile cache: improve mutex use

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Andrew Chadwick requested to merge achadwick/thunar:file-cache-mutex into master Jun 09, 2022
  • Overview 7
  • Commits 3
  • Pipelines 3
  • Changes 1

Addresses something I spotted in #787 (comment 50021). Sadly, it doesn't fix the assertion in #787 (closed) or the apparent file duplication in !255 (merged) :sigh:

You can take it or leave it, in other words. However I do think that this change makes the cache access more correct 😸

Remove an unneeded additional hash table insert in thunar_file_get(), and add some defensive programming to ensure that the side effect we now rely on remains the case.

Contingent cache lookup and insert pairs now happen in the same mutex-locked critical section. Added unguarded versions of a couple of already static funcs, for internal use only but more so.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: file-cache-mutex