---
title: "Toolkit plugin - Asynchronous behavior"
description: "The Toolkit plug-in in Geneos executes scripts asynchronously on a separate thread within the Netprobe. This prevents blocking other plug-ins and allows sequential or simultaneous execution based on the maxToolkitProcesses setting."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004019145-geneos-toolkit-plugin-asynchronous-behavior/index.html"
---
## Behavior

- The Toolkit plug-in executes scripts asynchronously.
- The Toolkit plug-in is executed by the Netprobe on a separate thread.

## Asynchronous Logic

## Example A

### Scenario

- Sample interval is 10 seconds
- Script finishes after 5 seconds

### Event

@01:00:00

- 1st sample
- Toolkit sampler executes the script

@01:00:05 - Toolkit sampler sends the update to the Gateway. Toolkit dataview gets updated.

@01:00:10

- 2nd sample
- Toolkit sampler checks the status of the script;
  - If the script is done, the sampler executes the script again. (This is what happens during this sample.)
  - If the script is not yet done, the sampler the sampler does not do anything.

## Example B

### Scenario

- Sample interval is 10 seconds
- Script finishes after 15 seconds

### Event

@01:00:00

- 1st sample
- Toolkit sampler executes the script

@01:00:10

- 2nd sample
- Toolkit sampler checks the status of the script;
  - If the script is done, the sampler executes the script again.
  - If the script is not yet done, the sampler does not do anything. (This is what happens during this sample.)

@01:00:15 - Toolkit sampler sends the update to the Gateway. Toolkit dataview gets updated.

@01:00:20

- 3rd sample
- Toolkit sampler checks the status of the script;
  - If the script is done, the sampler executes the script again. (This is what happens during this sample.)
  - If the script is not yet done, the sampler the sampler does not do anything.

## Separate Thread

The Toolkit plug-in is executed separately from other non-Toolkit plug-ins. This was done so that the Toolkit plug-in would not block the results of other non-Toolkit plugins if in case the former had a long sample duration.

Although the plug-in has its own thread, multiple Toolkit plug-ins are executed sequentially by default. For example, if there are 3 Toolkit plug-ins (Toolkit A, Toolkit B, Toolkit C) in a Netprobe, these Toolkits are run sequentially. Hence, Toolkit A needs to finish before Toolkit B can be executed. There is setting found in the Advanced Tab of the Netprobe that allows Toolkit plug-ins to run simultaneously. The setting is [maxToolkitProcesses](https://docs.itrsgroup.com/docs/geneos/current/processing/configuration/gateway_probes/index.html#probes_probe_maxToolkitProcesses). See below:

![MaxToolkitprocesses](https://docscdn.itrsgroup.com/faq/images/geneos/115004019145-inline-1-maxToolkitprocesses.png)


