class_semaphore.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Semaphore.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Semaphore:
  5. Semaphore
  6. =========
  7. **Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A synchronization Semaphore.
  12. Member Functions
  13. ----------------
  14. +------------------------+-----------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`post<class_Semaphore_post>` **(** **)** |
  16. +------------------------+-----------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`wait<class_Semaphore_wait>` **(** **)** |
  18. +------------------------+-----------------------------------------------+
  19. Description
  20. -----------
  21. A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
  22. Member Function Description
  23. ---------------------------
  24. .. _class_Semaphore_post:
  25. - :ref:`int<class_int>` **post** **(** **)**
  26. Lowers the ``Semaphore``, allowing one more thread in.
  27. .. _class_Semaphore_wait:
  28. - :ref:`int<class_int>` **wait** **(** **)**
  29. Tries to wait for the ``Semaphore``, if its value is zero, blocks until non-zero.