2 |
<head> |
<head> |
3 |
<meta name="author" content="Christian Schoenebeck"> |
<meta name="author" content="Christian Schoenebeck"> |
4 |
<title>fork() function</title> |
<title>fork() function</title> |
5 |
<meta name="description" content="Creates new execution instances."> |
<meta name="description" content="Creates new execution instances (threads)."> |
6 |
</head> |
</head> |
7 |
<body> |
<body> |
8 |
<h1>fork()</h1> |
<h1>fork()</h1> |
62 |
also check the alive state of its parent thread or abort the |
also check the alive state of its parent thread or abort the |
63 |
parent thread with the previously mentioned functions. |
parent thread with the previously mentioned functions. |
64 |
</p> |
</p> |
65 |
|
<p> |
66 |
|
This function follows the "all or nothing" principle. That means |
67 |
|
either all of the requested amount of child threads are spawned |
68 |
|
or none at all. |
69 |
|
</p> |
70 |
|
|
71 |
<note class="important"> |
<note class="important"> |
72 |
Due to the real-time nature of this script language and its use |
Due to the real-time nature of this script language and its use |
73 |
case, there is currently a limit of <code>8</code> child threads |
case, there is currently a limit of creating max. <code>8</code> child threads |
74 |
per thread. If you need more, you can still chain your fork() calls |
per thread. If you need more, you can still chain your fork() calls |
75 |
by letting the respective child threads call fork() themselves. |
by letting the respective child threads call fork() themselves. |
76 |
</note> |
</note> |
95 |
<tr> |
<tr> |
96 |
<td><code>??auto-abort??</code></td> |
<td><code>??auto-abort??</code></td> |
97 |
<td>Integer Number</td> |
<td>Integer Number</td> |
98 |
<td>Whether the child threads shall automatically be aborted when parent thread termianted:<br> |
<td>Whether the child threads shall automatically be aborted when parent thread terminated:<br> |
99 |
<code>0</code>: Don't abort child threads.<br> |
<code>0</code>: Don't abort child threads.<br> |
100 |
<code>1</code>: Automatically abort child threads.<br> |
<code>1</code>: Automatically abort child threads.<br> |
101 |
[optional, default: <code>1</code>]</td> |
[optional, default: <code>1</code>]</td> |