Merge branch 'master' into fs_emboss
# Conflicts: # src/libslic3r/Geometry.cpp # src/slic3r/GUI/Gizmos/GLGizmoBase.cpp # src/slic3r/GUI/Gizmos/GLGizmoMove.cpp # src/slic3r/GUI/Gizmos/GLGizmoMove.hpp # src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp # src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp # src/slic3r/GUI/Gizmos/GLGizmoScale.cpp # src/slic3r/GUI/Gizmos/GLGizmoScale.hpp # src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp # src/slic3r/GUI/ImGuiWrapper.cpp # src/slic3r/GUI/ImGuiWrapper.hpp # src/slic3r/GUI/Selection.cpp # tests/slic3rutils/slic3r_jobs_tests.cpp
This commit is contained in:
commit
a50d93cd66
327 changed files with 781602 additions and 153573 deletions
|
@ -95,11 +95,14 @@ TEST_CASE("cancel_all should remove all pending jobs", "[Jobs]") {
|
|||
auto pri = std::make_shared<Progress>();
|
||||
BoostThreadWorker worker{pri};
|
||||
|
||||
std::array<bool, 4> jobres = {false};
|
||||
std::array<bool, 4> jobres = {false, false, false, false};
|
||||
|
||||
queue_job(worker, [&jobres](Job::Ctl &) {
|
||||
jobres[0] = true;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
// FIXME: the long wait time is needed to prevent fail in MSVC
|
||||
// where the sleep_for function is behaving stupidly.
|
||||
// see https://developercommunity.visualstudio.com/t/bogus-stdthis-threadsleep-for-implementation/58530
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
});
|
||||
queue_job(worker, [&jobres](Job::Ctl &) {
|
||||
jobres[1] = true;
|
||||
|
@ -114,7 +117,9 @@ TEST_CASE("cancel_all should remove all pending jobs", "[Jobs]") {
|
|||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
});
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(500));
|
||||
// wait until the first job's half time to be sure, the cancel is made
|
||||
// during the first job's execution.
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
worker.cancel_all();
|
||||
|
||||
REQUIRE(jobres[0] == true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue