Changeset 264017 in webkit
- Timestamp:
- Jul 7, 2020, 8:07:52 AM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
TestWebKitAPI/Tests/WTF/RunLoop.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r264013 r264017 1 2020-07-07 Geoffrey Garen <ggaren@apple.com> 2 3 Added a test for callOnMainThread 4 https://bugs.webkit.org/show_bug.cgi?id=214025 5 6 Reviewed by Sam Weinig. 7 8 This test failed prior to https://trac.webkit.org/changeset/263981. 9 10 * TestWebKitAPI/Tests/WTF/RunLoop.cpp: 11 (TestWebKitAPI::TEST): Added a test demonstrating why a simple "is the 12 queue empty?" check doesn't work when you support both re-entrancy and 13 threads. While the main thread is sleeping in a nested RunLoop, a 14 secondary thread can see a non-empty queue. 15 1 16 2020-07-07 Philippe Normand <pnormand@igalia.com> 2 17 -
trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp
r263973 r264017 98 98 } 99 99 100 TEST(WTF_RunLoop, CallOnMainCrossThreadWhileNested) 101 { 102 WTF::initializeMainThread(); 103 104 bool done = false; 105 106 callOnMainThread([&done] { 107 Thread::create("CallOnMainCrossThread", [&done] { 108 callOnMainThread([&done] { 109 done = true; 110 }); 111 }); 112 113 Util::run(&done); 114 }); 115 callOnMainThread([] { }); 116 117 Util::run(&done); 118 } 119 100 120 class DerivedOneShotTimer : public RunLoop::Timer<DerivedOneShotTimer> { 101 121 public:
Note:
See TracChangeset
for help on using the changeset viewer.