MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / callBackSetProgress

Function callBackSetProgress

source/MRViewer/MRProgressBar.cpp:495–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495bool callBackSetProgress( float p )
496{
497 auto& instance = ProgressBarImpl::instance();
498
499 // set instance.allowCancel_ = true but write in memory only if it was false
500 bool expected = false;
501 instance.allowCancel_.compare_exchange_strong( expected, true, std::memory_order_relaxed );
502
503 setProgress( ( p + float( instance.currentTask_ - 1 ) ) / instance.taskCount_ );
504 return !instance.canceled_;
505}
506
507bool simpleCallBackSetProgress( float p )
508{

Callers 1

nextTaskFunction · 0.85

Calls 2

instanceFunction · 0.85
setProgressFunction · 0.85

Tested by

no test coverage detected