Skip to content

Commit

Permalink
Merge branch 'main' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Mar 10, 2023
2 parents c7265a3 + dfa0b87 commit 371d436
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions zend/ThreadsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ final class ThreadsModule extends \StandardModule
protected ?\Closure $g_init = null;
protected ?\Closure $g_end = null;

/** @var \zend_interrupt_function */
protected ?CData $original_interrupt_handler = null;

/** @var \Closure */
protected ?CData $original_sapi_output = null;

Expand All @@ -49,8 +46,6 @@ final class ThreadsModule extends \StandardModule

final public function thread_startup($runtime) //: Thread
{
\ze_ffi()->tsrm_mutex_lock($this->module_mutex);

\ze_ffi()->ts_resource_ex(0, null);

if (\IS_WINDOWS) {
Expand Down Expand Up @@ -105,13 +100,6 @@ final public function thread_shutdown()
\ze_ffi()->ts_free_thread();
}

final public function thread_interrupt(CData $execute_data)
{
if (\is_cdata($this->original_interrupt_handler)) {
($this->original_interrupt_handler)($execute_data);
}
}

final public function thread_func(CData $arg)
{
/** @var Thread|PThread */
Expand Down Expand Up @@ -261,30 +249,24 @@ public function startup(): void

public function module_startup(int $type, int $module_number): int
{
// $this->original_interrupt_handler = \ze_ffi()->zend_interrupt_function;
// \ze_ffi()->zend_interrupt_function = \closure_from($this, 'thread_interrupt');
return !\is_null($this->m_init)
? ($this->m_init)($type, $module_number) : \ZE::SUCCESS;
}

public function module_shutdown(int $type, int $module_number): int
{
// \ze_ffi()->zend_interrupt_function = $this->original_interrupt_handler;
// $this->original_interrupt_handler = null;
return !\is_null($this->m_end)
? ($this->m_end)($type, $module_number) : \ZE::SUCCESS;
}

public function request_startup(int $type, int $module_number): int
{
// $this->thread_startup($type, $module_number);
return !\is_null($this->r_init)
? ($this->r_init)($type, $module_number) : \ZE::SUCCESS;
}

public function request_shutdown(int $type, int $module_number): int
{
// $this->thread_shutdown();
return !\is_null($this->r_end)
? ($this->r_end)($type, $module_number) : \ZE::SUCCESS;
}
Expand Down

0 comments on commit 371d436

Please sign in to comment.