[Impeller] Fix a race in the ReactorGLES.PerThreadOperationQueues test (flutter/engine#57147)
Pass a flag to AddOperation to ensure that ReactorGLES does not immediately execute the operation on the second thread.
This commit is contained in:
@@ -131,8 +131,8 @@ TEST(ReactorGLES, PerThreadOperationQueues) {
|
||||
fml::AutoResetWaitableEvent event;
|
||||
bool op2_called = false;
|
||||
std::thread thread([&] {
|
||||
EXPECT_TRUE(
|
||||
reactor->AddOperation([&](const ReactorGLES&) { op2_called = true; }));
|
||||
EXPECT_TRUE(reactor->AddOperation(
|
||||
[&](const ReactorGLES&) { op2_called = true; }, true));
|
||||
event.Wait();
|
||||
EXPECT_TRUE(reactor->React());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user