Classref: Mutex, Semaphore, Thread, *Array (#5278)
(cherry picked from commit b587a13293
)
This commit is contained in:
parent
257d370677
commit
61b087dd66
|
@ -8071,7 +8071,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Resize the array.
|
||||
Set the size of the [ColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -8080,7 +8080,7 @@
|
|||
<argument index="1" name="color" type="Color">
|
||||
</argument>
|
||||
<description>
|
||||
Set an index in the array.
|
||||
Change the [Color] at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
|
@ -15558,7 +15558,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Resize the array.
|
||||
Set the size of the [IntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -15567,7 +15567,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
<argument index="1" name="integer" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Set an index in the array.
|
||||
Change the int at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
|
@ -18791,22 +18791,27 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
</class>
|
||||
<class name="Mutex" inherits="Reference" category="Core">
|
||||
<brief_description>
|
||||
A synchronization Mutex.
|
||||
</brief_description>
|
||||
<description>
|
||||
A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section.
|
||||
</description>
|
||||
<methods>
|
||||
<method name="lock">
|
||||
<description>
|
||||
Lock this [Mutex], blocks until it is unlocked by the current owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="try_lock">
|
||||
<return type="Error">
|
||||
</return>
|
||||
<description>
|
||||
Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY].
|
||||
</description>
|
||||
</method>
|
||||
<method name="unlock">
|
||||
<description>
|
||||
Unlock this [Mutex], leaving it to others threads.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -28048,12 +28053,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="byte" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Append an element at the end of the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Set the size of the [RawArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -28062,12 +28069,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="1" name="byte" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Change the byte at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Return the size of the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="RawArray">
|
||||
|
@ -28076,6 +28085,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="from" type="Array">
|
||||
</argument>
|
||||
<description>
|
||||
Create from a generic array.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -28365,12 +28375,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="value" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Append an element at the end of the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -28379,12 +28391,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="1" name="value" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Change the float at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Return the size of the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="RealArray">
|
||||
|
@ -28393,6 +28407,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="from" type="Array">
|
||||
</argument>
|
||||
<description>
|
||||
Create from a generic array.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -31629,20 +31644,24 @@ This method controls whether the position between two cached points is interpola
|
|||
</class>
|
||||
<class name="Semaphore" inherits="Reference" category="Core">
|
||||
<brief_description>
|
||||
A synchronization Semaphore.
|
||||
</brief_description>
|
||||
<description>
|
||||
A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
|
||||
</description>
|
||||
<methods>
|
||||
<method name="wait">
|
||||
<return type="Error">
|
||||
</return>
|
||||
<description>
|
||||
Tries to wait for the [Semaphore], if it's value is zero, blocks until non-zero.
|
||||
</description>
|
||||
</method>
|
||||
<method name="post">
|
||||
<return type="Error">
|
||||
</return>
|
||||
<description>
|
||||
Lowers the [Semaphore], allowing one more thread in.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -35527,7 +35546,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Reset the size of the array.
|
||||
Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -35536,6 +35555,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="1" name="string" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Change the [String] at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
|
@ -35551,6 +35571,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="from" type="Array">
|
||||
</argument>
|
||||
<description>
|
||||
Create from a generic array.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -37365,8 +37386,10 @@ This method controls whether the position between two cached points is interpola
|
|||
</class>
|
||||
<class name="Thread" inherits="Reference" category="Core">
|
||||
<brief_description>
|
||||
A unit of execution in a process.
|
||||
</brief_description>
|
||||
<description>
|
||||
A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
|
||||
</description>
|
||||
<methods>
|
||||
<method name="start">
|
||||
|
@ -37381,24 +37404,29 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="3" name="priority" type="int" default="1">
|
||||
</argument>
|
||||
<description>
|
||||
Start a new [Thread], it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY_* enum.
|
||||
Returns OK on success, or ERR_CANT_CREATE on failure.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_id" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<description>
|
||||
Return the id of the thread, uniquely identifying it among all threads.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_active" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Whether this thread is currently active, an active Thread cannot start work on a new method but can be joined with [method wait_to_finish].
|
||||
</description>
|
||||
</method>
|
||||
<method name="wait_to_finish">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<description>
|
||||
Joins the [Thread] and waits for it to finish. Returns what the method called returned.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -40184,14 +40212,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="vector2" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Inserts a Vector2 at the end.
|
||||
Insert a [Vector2] at the end.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -40200,14 +40228,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="1" name="vector2" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Changes the Vector2 at the given index.
|
||||
Change the [Vector2] at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Returns the size of the array.
|
||||
Return the size of the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="Vector2Array">
|
||||
|
@ -40216,7 +40244,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="from" type="Array">
|
||||
</argument>
|
||||
<description>
|
||||
Constructs a new Vector2Array. Optionally, you can pass in an Array that will be converted.
|
||||
Construct a new [Vector2Array]. Optionally, you can pass in an Array that will be converted.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -40443,14 +40471,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="vector3" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Inserts a Vector3 at the end.
|
||||
Insert a Vector3 at the end.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
Set the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
|
@ -40459,14 +40487,14 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="1" name="vector3" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Changes the Vector3 at the given index.
|
||||
Change the [Vector3] at the given index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Returns the size of the array.
|
||||
Return the size of the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="Vector3Array">
|
||||
|
@ -40475,7 +40503,7 @@ This method controls whether the position between two cached points is interpola
|
|||
<argument index="0" name="from" type="Array">
|
||||
</argument>
|
||||
<description>
|
||||
Constructs a new Vector3Array. Optionally, you can pass in an Array that will be converted.
|
||||
Construct a new Vector3Array. Optionally, you can pass in an Array that will be converted.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
Loading…
Reference in New Issue