From fdfdcd1e1b61593b6948515f8c99fb7a05206598 Mon Sep 17 00:00:00 2001
From: BradG <43330364+bakedpotat0@users.noreply.github.com>
Date: Thu, 1 Nov 2018 05:42:49 -0500
Subject: [PATCH] Add pthreads stubs for addRef/delRef/getRefCount functions
for Threaded class
---
pthreads/pthreads.php | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/pthreads/pthreads.php b/pthreads/pthreads.php
index 23894a0a..5bb0b076 100644
--- a/pthreads/pthreads.php
+++ b/pthreads/pthreads.php
@@ -177,6 +177,13 @@ class Threaded implements Collectable, Traversable, Countable, ArrayAccess {
*/
protected $worker;
+ /**
+ * (PECL pthreads >= 3.0.0)
+ * Increments the internal number of references to a Threaded object
+ * @return void
+ */
+ public function addRef() {}
+
/**
* (PECL pthreads >= 2.0.0)
* Fetches a chunk of the objects property table of the given size,
@@ -196,6 +203,13 @@ class Threaded implements Collectable, Traversable, Countable, ArrayAccess {
*/
public function count() {}
+ /**
+ * (PECL pthreads >= 3.0.0)
+ * Decrements the internal number of references to a Threaded object
+ * @return void
+ */
+ public function delRef() {}
+
/**
* (PECL pthreads >= 2.0.8)
* Makes thread safe standard class at runtime
@@ -205,6 +219,13 @@ class Threaded implements Collectable, Traversable, Countable, ArrayAccess {
*/
public static function extend( $class ) {}
+ /**
+ * (PECL pthreads >= 3.0.0)
+ * Retrieves the internal number of references to a Threaded object
+ * @return int
The number of references to the Threaded object
+ */ + public function getRefCount() {} + /** * (PECL pthreads < 3.0.0)