xp_clean

xp_clean([$history = false])

Scans and removes non-emittable signals and processes.

Note

This DOES NOT flush the processor.

A signal is determined to be emittable only if it has installed processes that have not exhausted.

Parameters:boolean – Erase any history of removed signals.
Return type:void

Example #1 Basic Usage

Basic usage example demonstrating cleaning old signals and processes.

<?php

xp_signal(XP_SIG('Test'), xp_exhaust(1, function(){
    echo 'SIG Test';
}));

xp_signal(XP_SIG('Test_2'), function(){
    echo 'SIG Test 2';
});

xp_emit(XP_SIG('Test'));

xp_clean();
var_dump(xp_find_signal(XP_SIG('Test')));

The above code will output.

SIG Test null
Read the Docs v: v5.0.1
Versions
latest
v5.0.1
v5.0.0
v4.0.1
v4.0.0
v3.1.1
v3.1.0
v3.0.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.