MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / start

Function start

ui/progresstask.h:454–479  ·  view source on GitHub ↗

! Start the thread and run all its functions in sequence. \param init Argument for first function in the thread */

Source from the content-addressed store, hash-verified

452 \param init Argument for first function in the thread
453 */
454 void start(QVariant init = QVariant())
455 {
456 if (!m_hasOwner || m_owner.isNull())
457 {
458 BinaryNinja::LogDebug("Starting background thread with no owning object. This is technically allowed but it might outlive any UIs it changes.");
459 }
460 if (m_then.empty() && m_catch.empty() && m_finally.empty())
461 {
462 std::unique_lock lock(m_finishLock);
463 m_finished = true;
464 deleteLater();
465 return;
466 }
467 else
468 {
469 m_init = init;
470 m_future = QtConcurrent::run([&] {
471 runThread();
472 {
473 std::unique_lock lock(m_finishLock);
474 m_finished = true;
475 }
476 deleteLater();
477 });
478 }
479 }
480
481 /*!
482 Block until the thread finishes

Callers

nothing calls this directly

Calls 4

runFunction · 0.85
runThreadFunction · 0.85
isNullMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected