Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • libX11 libX11
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 67
    • Issues 67
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • 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
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • lib
  • libX11libX11
  • Merge requests
  • !126

global: call XInitThreads() from the library's constructor

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Adam Jackson requested to merge ajax/libx11:always-xinitthreads into master Mar 23, 2022
  • Overview 11
  • Commits 1
  • Pipelines 2
  • Changes 2

There is really no point in not being thread safe, I measured, all you can see happen is noop performance gets like twice as slow and you have thread safety bugs. And we're using xcb as the transport which means we should expect threads in our clients anyway. Just do it.

This is a weaksauce fix because you could inline a lot of this away now, but this is about as much time as I can justify thinking about this.

Signed-off-by: Adam Jackson ajax@redhat.com


This is probably not mergeable in its current state since constructors aren't necessarily available in your compiler, but I wanted to at least throw this out there for discussion. Mesa's xcb code really wants to be able to use multiple threads, and if the xcb/xlib interface is going to be broken if the client didn't already call XInitThreads then there's really no point in using xcb over raw xlib.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: always-xinitthreads