FAnonTask := CreateTask(
        procedure (const task: IOmniTask) begin
          task.Comm.Send(0, Format('Hello, world! Reporting from thread %d',
            [GetCurrentThreadID]));
        end,
        'HelloWorld')
      .OnMessage(
        procedure(const task: IOmniTaskControl; const msg: TOmniMessage) begin
          lbLog.ItemIndex := lbLog.Items.Add(Format('%d:[%d/%s] %d|%s',
            [GetCurrentThreadID, task.UniqueID, task.Name, msg.msgID,
             msg.msgData.AsString]));
        end)
      .OnTerminated(
        procedure(const task: IOmniTaskControl) begin
          lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] Terminated',
            [task.UniqueID, task.Name]));
          btnHello.Enabled := true;
          FAnonTask := nil;
        end)
      .Run;