Commit Graph

7 Commits (60adc098da2d3026280bd0caa10915d6c8e6e14f)

Author SHA1 Message Date
Artur K 567c0ae24d
Modernization + AZStd::function compare fix. (#3680)
* Modernization + small fix.

Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.

Fix nullptr comparison of AZStd::function.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Apply review-based changes

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 9060423592
Settings registry notification deadlock fix (#3065)
* Added a StealHandlers function to AZ Event

The StealHandlers function is able to take all the handlers from an AZ
Event parameter and register them with the current AZ Event

This allows stealing handlers from expiring AZ Events, which is useful
for a lock and swap algorithm for thread safety.
1. Lock persistent AZ::Event
2. Swap persistent AZ::Event with local AZ::Event
3. Unlock persistent AZ::Event - Other threads can now add to this
   AZ::Event
4. Invoke handlers from local AZ::Event
5. Relock persistent AZ::Event
5. Swap local AZ::Event with persistent AZ::Event
6. Local AZ::Event now contains handlers that were added when the lock
   was free
7. Persistent AZ::Event now steals from local AZ::Event
8. Unlock persistent AZ::Event

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Separated SettingRegistry update/query mutex from Notifier update mutex

The Settings Registry update/query mutex is also better scoped to reduce
the amount of lock time.

The Notifier mutex being separate allows the Settings Registry to signal
a notification event without being under any mutex, by locking and
swapping the notifier event with a local instance

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Renamed StealHandlers function to ClaimHandlers
Replaced decltype keywords in ClaimHandlers to auto

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
moraaar 4475528df2
Fixed Event Hander's copy constructor and copy assignments
It was missing to save the event before connecting to it. (#2026)

Signed-off-by: moraaar <moraaar@amazon.com>
5 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
alexpete a10351f38d Initial commit 5 years ago