# Multithread

A multithread application is an application that has several simultaneous routines being executed.\
\
In Kalipso this can be implemented through Action Sets, either by calling them directly with “[Execute Action Set](/kalipso5/developing/form/actions/actions-description/group-forms/exec.-local-action-set.md)” with parameter “Thread Mode” set to ‘Yes’ or by “Start Timer” also with parameter “Thread Mode” set to ‘Yes’.\
\
When the Action Set is being executed the application continues to run without having to wait for it to end. Use multithread with extreme caution. It requires you to understand the implications and consequences of using them. For example if you execute an Action Set that uses a Variable and simultaneously the application uses that same Variable the outcome is unpredictable unless you know exactly what you are doing. You can use “[Critical Sections](/kalipso5/developing/specific-options/critical-sections.md)” in Kalipso to help manage this interaction between the different threads in your Project.\
\
**Critical Sections**\
A critical section is a part of your application that you don’t want to be executed simultaneously by other threads. When you call “[Critical Section Enter](/kalipso5/developing/form/actions/actions-description/group-code-flow/critical-section-enter.md)” action the call only returns if there is no other Thread inside the same critical section. After the call returns, no other thread can enter the same critical section until a call to “[Critical Section Leave](/kalipso5/developing/form/actions/actions-description/group-code-flow/critical-section-leave.md)” action is made by the current thread.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sysdevmobile.com/kalipso5/using/9.-other/multithread.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
