DRTVWR-476: Update LLMainThreadTask tests for simpler API.

meow-7.2.2
Nat Goodspeed 2019-12-13 14:20:19 -05:00
parent 66e533be81
commit ac6335f750
1 changed files with 0 additions and 3 deletions

View File

@ -75,14 +75,11 @@ namespace tut
// exceptions it might throw and deliver them via future
std::packaged_task<void()> thread_work(
[this, &result](){
// lock static data first
LockStatic lk;
// unblock test<2>()'s yield_until(1)
mSync.set(1);
// dispatch work to main thread -- should block here
bool on_main(
LLMainThreadTask::dispatch(
lk, // unlock this before blocking!
[]()->bool{
// have to lock static mutex to set static data
LockStatic()->ran = true;