Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • evince evince
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 718
    • Issues 718
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 40
    • Merge requests 40
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • evinceevince
  • Merge requests
  • !469

Wait for end of all jobs before exit

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Marek Kašík requested to merge mkasik/evince:wait-for-threads into main May 23, 2022
  • Overview 0
  • Commits 1
  • Pipelines 4
  • Changes 4

This merge request fixes #1713 for me. It waits until all jobs are done before quitting main(). This avoids access to globalParams of poppler since it is possible that it has been already destroyed in exit handlers but some jobs are still accessing it.

To easily reproduce this you need to delay execution of an operation in poppler. I've chosen the NameToCharCode::lookup(), I add 10 micro seconds delay to its while cycle via usleep(10). Then it is enough to quickly close evince window once it shows up during start. It is not 100% but good enough.

I've tried to fix this in poppler but it is much easier and more appropriate at evince.

Regarding the implementation, I've added the g_usleep() to the while cycle of the ev_job_scheduler_wait() function because e.g. valgrind does not quit without it.

See #1713 and https://gitlab.freedesktop.org/poppler/poppler/-/issues/1243 for additional info.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: wait-for-threads