From 61b087dd66d69152713e9b7fd0dc6329b33cda55 Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 18 Jun 2016 21:21:29 +0200 Subject: [PATCH] Classref: Mutex, Semaphore, Thread, *Array (#5278) (cherry picked from commit b587a13293840975b53bad3392374ad30a578064) --- doc/base/classes.xml | 58 ++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index dd32bbf3d37..1bbc6697a45 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -8071,7 +8071,7 @@ - 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. @@ -8080,7 +8080,7 @@ - Set an index in the array. + Change the [Color] at the given index. @@ -15558,7 +15558,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) - 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. @@ -15567,7 +15567,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) - Set an index in the array. + Change the int at the given index. @@ -18791,22 +18791,27 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + A synchronization Mutex. + 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. + Lock this [Mutex], blocks until it is unlocked by the current owner. + Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY]. + Unlock this [Mutex], leaving it to others threads. @@ -28048,12 +28053,14 @@ This method controls whether the position between two cached points is interpola + Append an element at the end of the array. + 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. @@ -28062,12 +28069,14 @@ This method controls whether the position between two cached points is interpola + Change the byte at the given index. + Return the size of the array. @@ -28076,6 +28085,7 @@ This method controls whether the position between two cached points is interpola + Create from a generic array. @@ -28365,12 +28375,14 @@ This method controls whether the position between two cached points is interpola + Append an element at the end of the array. + 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. @@ -28379,12 +28391,14 @@ This method controls whether the position between two cached points is interpola + Change the float at the given index. + Return the size of the array. @@ -28393,6 +28407,7 @@ This method controls whether the position between two cached points is interpola + Create from a generic array. @@ -31629,20 +31644,24 @@ This method controls whether the position between two cached points is interpola + A synchronization Semaphore. + A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation. + Tries to wait for the [Semaphore], if it's value is zero, blocks until non-zero. + Lowers the [Semaphore], allowing one more thread in. @@ -35527,7 +35546,7 @@ This method controls whether the position between two cached points is interpola - 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. @@ -35536,6 +35555,7 @@ This method controls whether the position between two cached points is interpola + Change the [String] at the given index. @@ -35551,6 +35571,7 @@ This method controls whether the position between two cached points is interpola + Create from a generic array. @@ -37365,8 +37386,10 @@ This method controls whether the position between two cached points is interpola + A unit of execution in a process. + 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. @@ -37381,24 +37404,29 @@ This method controls whether the position between two cached points is interpola + 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. + Return the id of the thread, uniquely identifying it among all threads. + 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]. + Joins the [Thread] and waits for it to finish. Returns what the method called returned. @@ -40184,14 +40212,14 @@ This method controls whether the position between two cached points is interpola - Inserts a Vector2 at the end. + Insert a [Vector2] at the end. - 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. @@ -40200,14 +40228,14 @@ This method controls whether the position between two cached points is interpola - Changes the Vector2 at the given index. + Change the [Vector2] at the given index. - Returns the size of the array. + Return the size of the array. @@ -40216,7 +40244,7 @@ This method controls whether the position between two cached points is interpola - 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. @@ -40443,14 +40471,14 @@ This method controls whether the position between two cached points is interpola - Inserts a Vector3 at the end. + Insert a Vector3 at the end. - 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. @@ -40459,14 +40487,14 @@ This method controls whether the position between two cached points is interpola - Changes the Vector3 at the given index. + Change the [Vector3] at the given index. - Returns the size of the array. + Return the size of the array. @@ -40475,7 +40503,7 @@ This method controls whether the position between two cached points is interpola - 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.