This is a special method that runs some code when this screen is opened as a task.
436056
public void run()
    {
        m_strFileName = this.getProperty("fileName");
        if (m_strFileName == null)
            m_strFileName = Constants.BLANK;
        m_strPackage = this.getProperty("package");
        if (m_strPackage == null)
            m_strPackage = Constants.BLANK;
        m_strProjectID = this.getProperty("project");
        if (m_strProjectID == null)
            m_strProjectID = Constants.BLANK;
        m_systemName = this.getProperty(Constants.SYSTEM_NAME);
        if (m_systemName == null)
            m_systemName = Constants.BLANK;
        this.writeFileDesc();   // Write the code
    }
601229
void execute() {
    boolean scheduleTaskRunner = false;
    synchronized (this) {
      if (!isThreadScheduled) {
        isThreadScheduled = true;
        scheduleTaskRunner = true;
      }
    }
    if (scheduleTaskRunner) {
      try {
        executor.execute(this);
      } catch (RuntimeException e) {
        // reset state in case of an error so that later calls to execute will actually do something
        synchronized (this) {
          isThreadScheduled = false;
        }
        // Log it and keep going.
        logger.log(
            Level.SEVERE,
            "Exception while running callbacks for " + listener + " on " + executor, 
            e);
        throw e;
      }
    }
  }
710463
public void open() {
        if (!isAttached()) {
            RootPanel.get().add(this);
        }
        windowCount++;
        if(windowOverlay != null && !windowOverlay.isAttached()) {
            RootPanel.get().add(windowOverlay);
        }

        if (fullsceenOnMobile && Window.matchMedia(Resolution.ALL_MOBILE.asMediaQuery())) {
            setMaximize(true);
        }

        if (openAnimation == null) {
            getOpenMixin().setOn(true);
            OpenEvent.fire(this, true);
        } else {
            setOpacity(0);
            Scheduler.get().scheduleDeferred(() -> {
                getOpenMixin().setOn(true);
                openAnimation.animate(this, () -> OpenEvent.fire(this, true));
            });
        }
    }
19576
function() {
    var self = this;
    if (!this.get('screen')) {
      this.set('screen', new Screen());
    }
    this.updateTextLines();
    this.observe(this, 'change:text change:width', function() {
      self.updateTextLines();
    });
    this.observe(this, 'change:visible change:textLines change:height', function() {
      self.render();
    });
    this.render();
  }
415865
private synchronized void start() {
        // only reschedule if monitor is still active (not in the process of being initialized or destroyed
        // don't schedule a task if there are no monitors or the monitorInterval was set to 0
        // don't schedule a task if the framework is stopping
        if (scheduledFuture == null
            && monitorState.get() == MonitorState.ACTIVE.ordinal()
            && !updateMonitors.isEmpty()
            && monitorInterval != 0
            && FrameworkState.isValid()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(this, tc, "Scan task scheduled");
            }
            scheduledFuture = coreService.getScheduler().scheduleWithFixedDelay(this, monitorInterval, monitorInterval, monitorTimeUnit);
        }
    }
877245
public void start() {
        if(actionInBackground != null) {

            Runnable jobToRun = new Runnable() {
                @Override
                public void run() {
                    result = (JobResult) actionInBackground.doAsync();
                    onResult();
                }
            };

            if(getExecutorService() != null) {
               asyncFutureTask = (FutureTask) getExecutorService().submit(jobToRun);
            } else {
                asyncThread = new Thread(jobToRun);
                asyncThread.start();
            }
        }
    }
308391
@Override
    public void run()
    {
        m_taskQueue.offer(this);
        // check if previous task is running for more than threshold
        SiteTasker task = m_taskQueue.peek();
        long currentTime = System.nanoTime();
        long headOfQueueOfferTime;
        if (task != null) {
            headOfQueueOfferTime = task.getQueueOfferTime();
        } else {
            headOfQueueOfferTime = currentTime;
        }
        if (headOfQueueOfferTime != m_previousTaskTimestamp) {
            m_previousTaskTimestamp = headOfQueueOfferTime;
            m_previousTaskPeekTime = currentTime;
        } else if (currentTime - m_previousTaskPeekTime >= m_procedureLogThreshold) {
            long waitTime = (currentTime - m_previousTaskPeekTime)/1_000_000_000L; // in seconds
            if (m_logger.isDebugEnabled()) {
                String taskInfo = (task == null) ? "" : " Task Info: " + task.getTaskInfo();
                m_logger.rateLimitedLog(SUPPRESS_INTERVAL, Level.DEBUG, null, TICK_MESSAGE + taskInfo, waitTime, m_partitionId);
            } else {
                m_logger.rateLimitedLog(SUPPRESS_INTERVAL, Level.INFO, null, TICK_MESSAGE, waitTime, m_partitionId);
            }
        }
    }
272099
@Override
  public void run()
  {
    while( !_shutdown )
    {
      try
      {
        Runnable task;

        synchronized( _queue )
        {
          while( _queue.isEmpty() )
          {
            if( _shutdown )
            {
              return;
            }
            _queue.wait();
          }

          // The double sync get/remove thing is done to support peekTask above.
          task = _queue.get( 0 );

          _queue.notifyAll();
        }

        try
        {
          task.run();
        }
        catch( Exception t ) // Don't catch ThreadDeath, even though we can rethrow it, it still prints to std err, which is undesirable sometimes
        {
          log( t );
        }
        synchronized( _queue )
        {
          if( _queue.size() > 0 )
          {
            _queue.removeFirst();
          }
        }
      }
      catch( Exception t ) // Don't catch ThreadDeath, even though we can rethrow it, it still prints to std err, which is undesirable sometimes
      {
        log( t );
      }
    }
  }
1195550
def on(cls, &block)
      @current_screen = @current_page = cls.new
      waiting_for  = "#{cls} to be active"
      wait_until(10, waiting_for) { @current_screen.active? } if @current_screen.respond_to?(:active?)
      block.call @current_screen if block
      @current_screen
    end
431570
@Trivial
    void initForRepeatingTask(boolean isFixedRate, long initialDelay, long interval) {
        this.initialDelay = initialDelay;
        this.interval = interval;
        this.isFixedRate = isFixedRate;
    }
797535
@Override
    public final void run() {
        String taskID = m_taskRecord.getTaskID();
        m_logger.debug("Starting task '{}' in tenant '{}'", taskID, m_tenant);
        try {
            TaskManagerService.instance().registerTaskStarted(this);
            m_lastProgressTimestamp = System.currentTimeMillis();
            setTaskStart();
            execute();
            setTaskFinish();
        } catch (Throwable e) {
            m_logger.error("Task '" + taskID + "' failed", e);
            String stackTrace = Utils.getStackTrace(e);
            setTaskFailed(stackTrace);
        } finally {
            TaskManagerService.instance().registerTaskEnded(this);
        }
    }
277017
function() {
            if (_.size(this.tasks) > 0) {
                this.empty = false;
                var task = this.tasks.shift();
                this.startTask(task);
                this.trigger("tasks:next");
            } else {
                this.empty = true;
                this.trigger("tasks:finish");
            }      
        }
703536
public void executeInIoThread(Runnable task, boolean alwaysAsync) {
        if (!alwaysAsync && isIoThread()) {
            task.run();
        } else {
            registerTask(task);
        }
    }
704989
def run(self):
        
        while True:
            task = self.tasks_queue.get()
            if task is None:
                self.tasks_queue.task_done()
                break
            # No exception detected in any thread,
            # continue the execution.
            if self.exceptions_queue.empty():
                try:
                    # Execute the task
                    func, args, kargs = task
                    result = func(*args, **kargs)
                    self.results_queue.put(result)
                except Exception as e:
                    self.exceptions_queue.put(e)
            # Mark this task as done, whether an exception happened or not
            self.tasks_queue.task_done()
760973
def start(self):
        
        if self.threadPool:
            self.threadPool.addTask(self)

            # Lets other threads have a chance to run
            time.sleep(0)
        else:
            raise TaskError("start(): nothing to start for task %s" % self)
1322565
public static void invokeTask (String name, Task task, TaskObserver observer)
    {
        // create a task runner and stick it in our task table
        TaskRunner runner = new TaskRunner(name, task, observer);
        _tasks.put(name, runner);
        // then start the runner up
        runner.start();
    }
8797
public void runTask(Handler<Task> task) {
    if (currentTask == null) {
      currentTask = new Task(this);
      task.handle(currentTask);
    } else {
      queue.add(task);
    }
  }