Add optional count argument to Sempahore::post

Co-authored-by: RandomShaper <RandomShaper@users.noreply.github.com>
Co-authored-by: A Thousand Ships (she/her) <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Mickeon <Mickeon@users.noreply.github.com>
This commit is contained in:
Radiant
2024-08-27 06:12:10 +03:00
parent 8e80c10704
commit 6311ee5bd5
5 changed files with 65 additions and 5 deletions

View File

@@ -390,12 +390,17 @@ class Semaphore : public RefCounted {
GDCLASS(Semaphore, RefCounted);
::Semaphore semaphore;
protected:
static void _bind_methods();
#ifndef DISABLE_DEPRECATED
void _post_bind_compat_93605();
static void _bind_compatibility_methods();
#endif // DISABLE_DEPRECATED
public:
void wait();
bool try_wait();
void post();
void post(int p_count = 1);
};
class Thread : public RefCounted {