<< Prev        Next >>

ID : 146

KillAll

Function

Forcibly kill all tasks other than Supervisory tasks or Panel screen tasks.

Syntax

KillAll[ Synchronizing flag]

Guaranteed Entry

Synchronizing flag
Specify whether the processing is executed synchronously by integer type data. Specify 0, 1, -1 as shown table below. This is omittable. This should be "0" if it is omitted.
flag Description
0, OFF, or False Asynchronous processing (Execute next process without waiting the end of all tasks.)
1 (or ON), -1 (or True) Synchronous processing (Execute next processing after all tasks end.)

Description

All running tasks other than Supervisory tasks or Panel screen tasks are forcibly killed and the program reaches the stop-state.

If tasks subject to KillAll are normal tasks, all normal tasks including the own task are terminated.

This is the same function as program reset.

Attention

After KillAll is executed, it may take some time until all tasks stop. To perform Run right after KillAll, be sure to ensure that all tasks are stopped in advance.

Example

'!TITLE "Killing All Tasks Other Than Supervisory Tasks"
' Kill all programs
Sub Sample_KillAll

  Dim aaa As Integer

  ' Start up two different programs in parallel
  Run KillAll_Sample2

  Run KillAll_Sample3

  For aaa = 0 To 50

    ' Display 0-50 count-up as processing of invoker
    PrintDbg "Call Sample_KillAll " & aaa

  Next

  ' Kill all programs
  KillAll

End Sub

ID : 146

<< Prev        Next >>