* 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>
* Minimal TypeInfo header/reduce std interdependencies.
TypeInfoSimple.h is a small header that can replace the use of
TypeInfo.h in some cases.
Signed-off-by: Nemerle <nemerle5+git@gmail.com>
* Windows build fixed
Removed algorithm.h from string_view.h
smoke-test passed
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Resotore dynamic_pointer_cast in intrusive_ptr
Requested by reviewer.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Fix CI build
string.h - missed alogorithm.h, since it was removed from string_view
NodeWrapper.h - missing smart_ptr.h
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
Co-authored-by: Nemerle <nemerle5+git@gmail.com>
* Converted the AZStd implementations of unintialized construct to use std
The uninitialized_default_construct and uninitialized_value_construct
functions implementations have been removed and the Standard library
implementations have been brought into the AZStd namespace scope
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a default construct to the UninitializedValueConstruct test case
which value initializes the int member which uses zero initialization to
initalize it to zero.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* 1. Initial support for loading dylibs outside the bundle.
2. Child processes inherit parent's environment if no environment is explicitly specified(should change to append the parent's environment even if environment variables are explicitly specified).
3. Update some time functions to use system uptime instead of wall clock time when computing elapsed time. This fixes false timeouts when the OS goes to sleep.
4. Increase wait times for AssetBuilders and some Atom tools to connect to the AssetProcessor. This is needed because GateKeeper slows down first time bootup which results in asset processing failures.
With this change we'll be able to run Editor and AssetProcessor from an install on Mac and we will also be able to build and run projects using the installed engine as an SDK.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Remove debug messages.
2. Fix license
3. Pass parent's environment variables to child processes by default(on Mac).
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Add more detailed comments.2. Use a custom ly_copy for Mac and leave the default as is.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Address some feedback from review
Signed-off-by: amzn-sj <srikkant@amazon.com>
The drain function was used only before the API gained the ability to
wait on the completion of a graph. This is the correct way to "drain"
the task executor of work.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
* EnvironmentVariableHolder: reduce the size of template instantiation.
Move almost all destruction logic to EnvironmentVariableHolderBase::UnregisterAndDestroy.
Specialized templates have DestructDispatchNoLock instead that can either destroy the held value,
or the holder itself.
UnregisterAndDestroy has been moved to the cpp file.
All of these changes reduce the profile build time and size on linux
Here, the size of bin/profile goes down by ~200MB.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Requested changes/fixups.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Use scoped_lock to simplify mutex management.
Updated comments.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Hopefully a fix for env variables released at a wrong time
Conditional was using incorrect variable
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Comment fixup
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Missing negation in conditional
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Cleanup the internal logic in UnregisterAndDestroy
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* fix an error with addr_impl_ref assignment operator
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* chrono duration unary '+' was missing a return
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* HierarchyMenu constructor logic fix
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* at least assert in case of invalid arguments to ring_buffer::insert
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* EditorSettings using incorrect string_view::find result comparison
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
"If constexpr" branches are evaluated at template instantiation time,
but static assertions receiving false are triggered even earlier.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
Also, came up with more useful benchmarks that actually measure the
enqueue/dequeue operations for various simple workflows. For retained
graphs, time-of-flight from submission to execution is ~1us per job,
indicating job granularity should be >20us for retained jobs. For
dynamic jobs, where we need to pay the cost of allocation, a granularity
of ~100+ us may be advised.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
- Handle changing of active camera entirely inside CameraComponentController
- Remove a LOT of legacy Cry things related to cameras
- Add a CameraSystemComponent to handle ActiveCameraRequestBus and CameraSystemRequestBus
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>