mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #5405 from Kelimion/self_cleanup
Expand `self_cleanup` documentation.
This commit is contained in:
+24
-12
@@ -258,8 +258,10 @@ to execute. The thread will have priority specified by the `priority` parameter.
|
|||||||
|
|
||||||
If `self_cleanup` is specified, after the thread finishes the execution of the
|
If `self_cleanup` is specified, after the thread finishes the execution of the
|
||||||
`fn` procedure, the resources associated with the thread are going to be
|
`fn` procedure, the resources associated with the thread are going to be
|
||||||
automatically freed. **Do not** dereference the `^Thread` pointer, if this
|
automatically freed.
|
||||||
flag is specified.
|
|
||||||
|
**Do not** dereference the `^Thread` pointer, if this flag is specified.
|
||||||
|
That includes calling `join`, which needs to dereference ^Thread`.
|
||||||
|
|
||||||
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
||||||
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
||||||
@@ -291,8 +293,10 @@ to execute. The thread will have priority specified by the `priority` parameter.
|
|||||||
|
|
||||||
If `self_cleanup` is specified, after the thread finishes the execution of the
|
If `self_cleanup` is specified, after the thread finishes the execution of the
|
||||||
`fn` procedure, the resources associated with the thread are going to be
|
`fn` procedure, the resources associated with the thread are going to be
|
||||||
automatically freed. **Do not** dereference the `^Thread` pointer, if this
|
automatically freed.
|
||||||
flag is specified.
|
|
||||||
|
**Do not** dereference the `^Thread` pointer, if this flag is specified.
|
||||||
|
That includes calling `join`, which needs to dereference ^Thread`.
|
||||||
|
|
||||||
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
||||||
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
||||||
@@ -328,8 +332,10 @@ to execute. The thread will have priority specified by the `priority` parameter.
|
|||||||
|
|
||||||
If `self_cleanup` is specified, after the thread finishes the execution of the
|
If `self_cleanup` is specified, after the thread finishes the execution of the
|
||||||
`fn` procedure, the resources associated with the thread are going to be
|
`fn` procedure, the resources associated with the thread are going to be
|
||||||
automatically freed. **Do not** dereference the `^Thread` pointer, if this
|
automatically freed.
|
||||||
flag is specified.
|
|
||||||
|
**Do not** dereference the `^Thread` pointer, if this flag is specified.
|
||||||
|
That includes calling `join`, which needs to dereference ^Thread`.
|
||||||
|
|
||||||
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
||||||
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
||||||
@@ -371,8 +377,10 @@ to execute. The thread will have priority specified by the `priority` parameter.
|
|||||||
|
|
||||||
If `self_cleanup` is specified, after the thread finishes the execution of the
|
If `self_cleanup` is specified, after the thread finishes the execution of the
|
||||||
`fn` procedure, the resources associated with the thread are going to be
|
`fn` procedure, the resources associated with the thread are going to be
|
||||||
automatically freed. **Do not** dereference the `^Thread` pointer, if this
|
automatically freed.
|
||||||
flag is specified.
|
|
||||||
|
**Do not** dereference the `^Thread` pointer, if this flag is specified.
|
||||||
|
That includes calling `join`, which needs to dereference ^Thread`.
|
||||||
|
|
||||||
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
||||||
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
||||||
@@ -420,8 +428,10 @@ to execute. The thread will have priority specified by the `priority` parameter.
|
|||||||
|
|
||||||
If `self_cleanup` is specified, after the thread finishes the execution of the
|
If `self_cleanup` is specified, after the thread finishes the execution of the
|
||||||
`fn` procedure, the resources associated with the thread are going to be
|
`fn` procedure, the resources associated with the thread are going to be
|
||||||
automatically freed. **Do not** dereference the `^Thread` pointer, if this
|
automatically freed.
|
||||||
flag is specified.
|
|
||||||
|
**Do not** dereference the `^Thread` pointer, if this flag is specified.
|
||||||
|
That includes calling `join`, which needs to dereference ^Thread`.
|
||||||
|
|
||||||
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
||||||
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
||||||
@@ -471,8 +481,10 @@ to execute. The thread will have priority specified by the `priority` parameter.
|
|||||||
|
|
||||||
If `self_cleanup` is specified, after the thread finishes the execution of the
|
If `self_cleanup` is specified, after the thread finishes the execution of the
|
||||||
`fn` procedure, the resources associated with the thread are going to be
|
`fn` procedure, the resources associated with the thread are going to be
|
||||||
automatically freed. **Do not** dereference the `^Thread` pointer, if this
|
automatically freed.
|
||||||
flag is specified.
|
|
||||||
|
**Do not** dereference the `^Thread` pointer, if this flag is specified.
|
||||||
|
That includes calling `join`, which needs to dereference ^Thread`.
|
||||||
|
|
||||||
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
**IMPORTANT**: If `init_context` is specified and the default temporary allocator
|
||||||
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
is used, the thread procedure needs to call `runtime.default_temp_allocator_destroy()`
|
||||||
|
|||||||
Reference in New Issue
Block a user