MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / CancelStreaming

Method CancelStreaming

Source/Engine/Content/Asset.cpp:523–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523void Asset::CancelStreaming()
524{
525 // Cancel loading task but go over asset locker to prevent case if other load threads still loads asset while it's reimported on other thread
526 Locker.Lock();
527 auto loadingTask = (ContentLoadTask*)Platform::AtomicRead(&_loadingTask);
528 Locker.Unlock();
529 if (loadingTask)
530 {
531 Platform::AtomicStore(&_loadingTask, 0);
532 LOG(Warning, "Cancel loading task for \'{0}\'", ToString());
533 loadingTask->Cancel();
534 }
535}
536
537#if USE_EDITOR
538

Callers

nothing calls this directly

Calls 6

LockMethod · 0.80
UnlockMethod · 0.80
AtomicReadFunction · 0.50
AtomicStoreFunction · 0.50
ToStringFunction · 0.50
CancelMethod · 0.45

Tested by

no test coverage detected