| 1635 | } |
| 1636 | |
| 1637 | bool Node::ensureMainThread( Actions::Runnable::RunnableFunc runnable, |
| 1638 | const Action::UniqueID& uniqueIdentifier ) { |
| 1639 | if ( Engine::isMainThread() ) { |
| 1640 | runnable(); |
| 1641 | return true; |
| 1642 | } else { |
| 1643 | Action* action = Actions::Runnable::New( std::move( runnable ) ); |
| 1644 | action->setTag( uniqueIdentifier ); |
| 1645 | runAction( action ); |
| 1646 | } |
| 1647 | return false; |
| 1648 | } |
| 1649 | |
| 1650 | void Node::setTimeout( Actions::Runnable::RunnableFunc runnable, const Time& delay, |
| 1651 | const Action::UniqueID& uniqueIdentifier ) { |
no test coverage detected