class_semaphore.rst 1.1 KB

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