Page MenuHomeWildfire Games

Don't crash when calling the profiler from a 'non-main' thread (D14 outtake)

Authored by wraitii on May 1 2019, 10:46 AM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
rP22248: Don't crash when calling the profiler from a 'non-main' thread

D14 outtake.

Motive behind the change: calls to Profile() currently crash unless they are triggered from the main thread, but it's somewhat difficult to know that from the code. It makes more sense to silently ignore those particularly so we can easily have the same code be threaded or not.

This switches a few Profile3 to Profile2 as Profile3 doesn't make much sense for those.

Test Plan

Look at the code.

Diff Detail

rP 0 A.D. Public Repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.May 1 2019, 10:46 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"
Executing section JS...
Executing section cli...

Link to build:

This revision was not accepted when it landed; it landed in state Needs Review.May 4 2019, 5:03 PM
This revision was automatically updated to reflect the committed changes.