[Webkit-unassigned] [Bug 231670] [GLIB] Simplify SleepDisabler by checking if we are under sandbox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 18 13:20:04 PDT 2021


--- Comment #15 from Michael Catanzaro <mcatanzaro at gnome.org> ---
(In reply to Adrian Perez from comment #12)
> The C++11 specification guarantees that a static local is initialized only
> once when program control flow goes through it, and that it is thread-safe
> (amusingly, manually checking the optional is not thread-safe :D)

Remember Apple ports use some compiler flag to disable the threadsafety guarantee (presumably it has a noticeable perf impact?), so you can only rely on this in Linux-specific code, never in cross-platform code. (In this case, it's fine only because these functions are GLib-specific.)

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211018/309511f9/attachment.htm>

More information about the webkit-unassigned mailing list