Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
280B

  1. using System.Threading;
  2. namespace Svelto.Utilities
  3. {
  4. public static class ThreadUtility
  5. {
  6. public static void MemoryBarrier()
  7. {
  8. #if NETFX_CORE || NET_4_6
  9. Interlocked.MemoryBarrier();
  10. #else
  11. Thread.MemoryBarrier();
  12. #endif
  13. }
  14. }
  15. }