ThreadHelper.cpp 495 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "ThreadHelper.h"
  9. static AZ_THREAD_LOCAL AZ::s64 s_currentJobId = 0;
  10. namespace AssetProcessor
  11. {
  12. AZ::s64 GetThreadLocalJobId()
  13. {
  14. return s_currentJobId;
  15. }
  16. void SetThreadLocalJobId(AZ::s64 jobId)
  17. {
  18. s_currentJobId = jobId;
  19. }
  20. }