Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
J
jami-lrc
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Requirements
    • Requirements
    • List
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • savoirfairelinux
  • jami-lrc
  • Issues
  • #354

Closed
Open
Opened Oct 22, 2015 by RingBot@RingBotOwner

Singletons are not safe in LRC

Issue generated from Tuleap's migration script. Originally submitted by: Guillaume Roguez (guillaume)

LRC uses massively Singletons with an implementation based on class global static member (a pointer).
The first initialization is done by checking the value of the static member, set to nullptr during compilation unit initialization.
This implementation is not thread-safe and hides loop-dependency between classes.

I propose to use C++11 safe way by using local static initialization inside a static method of the class (i.e. instance()).
This is known as "Construct Members On First Use Idiom"

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: savoirfairelinux/ring-lrc#354