SchedulerToolbox.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #pragma once
  8. #include <react/core/EventBeat.h>
  9. #include <react/uimanager/ComponentDescriptorFactory.h>
  10. #include <react/utils/ContextContainer.h>
  11. #include <react/utils/RuntimeExecutor.h>
  12. namespace facebook {
  13. namespace react {
  14. /*
  15. * Contains all external dependencies of Scheduler.
  16. * Copyable.
  17. */
  18. struct SchedulerToolbox final {
  19. /*
  20. * Represents general purpose DI container for product components/needs.
  21. * Must not be `nullptr`.
  22. */
  23. ContextContainer::Shared contextContainer;
  24. /*
  25. * Represents externally managed, lazily available collection of components.
  26. */
  27. ComponentRegistryFactory componentRegistryFactory;
  28. /*
  29. * Represents running JavaScript VM and associated execution queue.
  30. */
  31. RuntimeExecutor runtimeExecutor;
  32. /*
  33. * Asynchronous & synchronous event beats.
  34. * Represent connections with the platform-specific run loops and general
  35. * purpose background queue.
  36. */
  37. EventBeat::Factory asynchronousEventBeatFactory;
  38. EventBeat::Factory synchronousEventBeatFactory;
  39. };
  40. } // namespace react
  41. } // namespace facebook