Skip to content

[core] Rework thErr object to prevent usage of global initialization #3311

@ethouris

Description

@ethouris

Currently the thErr object is created as a global object and undergoes global initialization rules.

Desired is that this object be created (still as thread-local one) as local static object, to follow the model of Meyer's singleton pattern.

Additionally the object functioning as a replacement for missing thread_local for C++03 using pthrad_setspecific should be generic and allow to create something like CThreadLocal<CUDTException>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: MaintenanceWork required to maintain or clean up the code[core]Area: Changes in SRT library core

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions