Sv translation | ||
---|---|---|
| ||
No concurrency control The following example rule set is composed of two loops. Each loop uses the Write To File action to write several lines of text to a text file with a small delay between the writing of each line.
If a single instance is run, the output looks like this:
If however multiple instances are run in quick succession, the output looks like this:
Because each instance is writing to the file at the same time, the output from the instances is interleaved.
Limit Concurrency only In the following example only the Limit Concurrency action is used. It is configured to allow only a single instance to run. The limiter is named
************************* Starting Loop 1 *************************
Note that only one instance of the chain was allowed to write to the file at once. Each instance completed both loops before the next instance was allowed to proceed. This is because when each instance acquires the limiter at the Limit Concurrency action, it holds it until it completes both loops. At the end of the second loop the limiter is automatically released because it is the end of the rule chain. The next instance waiting at the Limit Concurrency action is then able to acquire the limiter and proceed.
Limit Concurrency and Release Concurrency In the following example both the Limit Concurrency action and the Release Concurrency action are used. The regions of the rule chain delimited by the Limit Concurrency and Release Concurrency action pair will be limited to a single instance running. Any other instances will queue at the Limit Concurrency action until the currently executing instances reaches the Release Concurrency action. The next waiting instance will then begin executing the actions within the Limit Concurrency to Release Concurrency region.
Note that as in the previous example, the output within the loop is not interleaved as it was in the first example. But it is different from the previous example in that each instance was allowed to complete the first loop before the first instance was allowed to proceed with the second loop. This is because between the two loops the instance is releasing and re-acquiring the limiter which results in it effectively going to the end of the queue and having to wait its turn for the limiter again.
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
Die folgende Beispielregelsammlung besteht aus zwei Schleifen. Jede Schleife verwendet die Aktion In Datei schreiben, um mehrere Zeilen Text in eine Textdatei zu schreiben – mit einer kleinen Verzögerung zwischen dem Schreiben der einzelnen Zeilen. Wenn eine einzelne Instanz ausgeführt wird, sieht die Ausgabe wie folgt aus:
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
下面的示例规则集包括两个循环。 每个循环使用将文本写入文件操作将多行文本写入文本文件,在每行文字之间有小幅延迟。 如果一个实例正在运行,输出看起来像这样:
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
El conjunto de reglas del ejemplo siguiente está compuesto por dos bucles. Cada bucle utiliza la acción Escribir texto en archivo para escribir varias líneas de texto en un archivo de texto con un pequeño retraso entre la escritura de cada línea. Si se ejecuta una sola instancia, la salida tendrá este aspecto:
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
Dans l'exemple suivant, le jeu de règles est composé de deux boucles. Chaque boucle utilise l'action Écrire le texte dans un fichier pour écrire plusieurs lignes de texte dans un fichier texte avec un léger délai entre l'écriture de chaque ligne. Si une seule instance est exécutée, le résultat ressemble à ceci :
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
次の例のルール セットは 2 つのループで構成されます。 各ループは、ファイルへのテキスト書き込みアクションを使用して、複数のテキスト行をテキスト ファイルに書き込みますが、各行の書き込みの間に短い遅延があります。 1 つのインスタンスが実行された場合、出力は次のようになります。
|