BaguettePHP/mastodon-api

View on GitHub
docs/class-GuzzleHttp.Promise.TaskQueue.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

    <title>Class GuzzleHttp\Promise\TaskQueue | ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK</title>

    <link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">

</head>

<body>
<div id="left">
    <div id="menu">
        <a href="index.html" title="Overview"><span>Overview</span></a>


        <div id="groups">
                <h3>Namespaces</h3>
            <ul>
                <li>
                    <a href="namespace-Baguette.html">
                        Baguette<span></span>
                    </a>

                        <ul>
                <li>
                    <a href="namespace-Baguette.Mastodon.html">
                        Mastodon<span></span>
                    </a>

                        <ul>
                <li class="main">
                    <a href="namespace-Baguette.Mastodon.Config.html">
                        Config                    </a>

                        </li>
                <li class="main">
                    <a href="namespace-Baguette.Mastodon.Entity.html">
                        Entity                    </a>

                        </li>
                <li class="main">
                    <a href="namespace-Baguette.Mastodon.Grant.html">
                        Grant                    </a>

                        </li>
                <li class="main">
                    <a href="namespace-Baguette.Mastodon.Service.html">
                        Service                    </a>

                        </li>
                            </ul></li></ul></li>
                <li class="active">
                    <a href="namespace-GuzzleHttp.html">
                        GuzzleHttp<span></span>
                    </a>

                        <ul>
                <li>
                    <a href="namespace-GuzzleHttp.Cookie.html">
                        Cookie                    </a>

                        </li>
                <li>
                    <a href="namespace-GuzzleHttp.Exception.html">
                        Exception                    </a>

                        </li>
                <li>
                    <a href="namespace-GuzzleHttp.Handler.html">
                        Handler                    </a>

                        </li>
                <li class="active">
                    <a href="namespace-GuzzleHttp.Promise.html">
                        Promise                    </a>

                        </li>
                            </ul></li>
                <li>
                    <a href="namespace-Psr.html">
                        Psr<span></span>
                    </a>

                        <ul>
                <li>
                    <a href="namespace-Psr.Http.html">
                        Http<span></span>
                    </a>

                        <ul>
                <li>
                    <a href="namespace-Psr.Http.Message.html">
                        Message                    </a>

                        </li>
                            </ul></li></ul></li>
                <li>
                    <a href="namespace-Teto.html">
                        Teto<span></span>
                    </a>

                        <ul>
                <li>
                    <a href="namespace-Teto.Object.html">
                        Object                    </a>

                        </li>
                            </ul></li>
            </ul>
        </div>

        <hr>


        <div id="elements">
            <h3>Classes</h3>
            <ul>
                <li><a href="class-GuzzleHttp.Promise.Coroutine.html">Coroutine</a></li>
                <li><a href="class-GuzzleHttp.Promise.EachPromise.html">EachPromise</a></li>
                <li><a href="class-GuzzleHttp.Promise.FulfilledPromise.html">FulfilledPromise</a></li>
                <li><a href="class-GuzzleHttp.Promise.Promise.html">Promise</a></li>
                <li><a href="class-GuzzleHttp.Promise.RejectedPromise.html">RejectedPromise</a></li>
                <li class="active"><a href="class-GuzzleHttp.Promise.TaskQueue.html">TaskQueue</a></li>
            </ul>

            <h3>Interfaces</h3>
            <ul>
                <li><a href="class-GuzzleHttp.Promise.PromiseInterface.html">PromiseInterface</a></li>
                <li><a href="class-GuzzleHttp.Promise.PromisorInterface.html">PromisorInterface</a></li>
                <li><a href="class-GuzzleHttp.Promise.TaskQueueInterface.html">TaskQueueInterface</a></li>
            </ul>


            <h3>Exceptions</h3>
            <ul>
                <li><a href="class-GuzzleHttp.Promise.AggregateException.html">AggregateException</a></li>
                <li><a href="class-GuzzleHttp.Promise.CancellationException.html">CancellationException</a></li>
                <li><a href="class-GuzzleHttp.Promise.RejectionException.html">RejectionException</a></li>
            </ul>


            <h3>Functions</h3>
            <ul>
                <li><a href="function-GuzzleHttp.Promise.all.html">all</a></li>
                <li><a href="function-GuzzleHttp.Promise.any.html">any</a></li>
                <li><a href="function-GuzzleHttp.Promise.coroutine.html">coroutine</a></li>
                <li><a href="function-GuzzleHttp.Promise.each.html">each</a></li>
                <li><a href="function-GuzzleHttp.Promise.each_limit.html">each_limit</a></li>
                <li><a href="function-GuzzleHttp.Promise.each_limit_all.html">each_limit_all</a></li>
                <li><a href="function-GuzzleHttp.Promise.exception_for.html">exception_for</a></li>
                <li><a href="function-GuzzleHttp.Promise.inspect.html">inspect</a></li>
                <li><a href="function-GuzzleHttp.Promise.inspect_all.html">inspect_all</a></li>
                <li><a href="function-GuzzleHttp.Promise.is_fulfilled.html">is_fulfilled</a></li>
                <li><a href="function-GuzzleHttp.Promise.is_rejected.html">is_rejected</a></li>
                <li><a href="function-GuzzleHttp.Promise.is_settled.html">is_settled</a></li>
                <li><a href="function-GuzzleHttp.Promise.iter_for.html">iter_for</a></li>
                <li><a href="function-GuzzleHttp.Promise.promise_for.html">promise_for</a></li>
                <li><a href="function-GuzzleHttp.Promise.queue.html">queue</a></li>
                <li><a href="function-GuzzleHttp.Promise.rejection_for.html">rejection_for</a></li>
                <li><a href="function-GuzzleHttp.Promise.settle.html">settle</a></li>
                <li><a href="function-GuzzleHttp.Promise.some.html">some</a></li>
                <li><a href="function-GuzzleHttp.Promise.task.html">task</a></li>
                <li><a href="function-GuzzleHttp.Promise.unwrap.html">unwrap</a></li>
            </ul>
        </div>
    </div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
    <form id="search">
        <input type="hidden" name="cx" value="">
        <input type="hidden" name="ie" value="UTF-8">
        <input type="text" name="q" class="text" placeholder="Search">
    </form>

    <div id="navigation">
        <ul>
            <li>
                <a href="index.html" title="Overview"><span>Overview</span></a>
            </li>
            <li>
                <a href="namespace-GuzzleHttp.Promise.html" title="Summary of GuzzleHttp\Promise"><span>Namespace</span></a>
            </li>
            <li class="active">
<span>Class</span>            </li>
        </ul>
        <ul>
        </ul>
        <ul>
        </ul>
    </div>

<div id="content" class="class">
    <h1>Class TaskQueue</h1>


    <div class="description">
    <p>A task queue that executes tasks in a FIFO order.</p>

<p>This task queue class is used to settle promises asynchronously and
maintains a constant stack size. You can use the task queue asynchronously
by calling the <code>run()</code> function of the global task queue in an event loop.
 GuzzleHttp\Promise\queue()->run();</p>
    </div>

    <dl class="tree">
        <dd style="padding-left:0px">
<b><span>GuzzleHttp\Promise\TaskQueue</span></b>            
             implements 
                <a href="class-GuzzleHttp.Promise.TaskQueueInterface.html"><span>GuzzleHttp\Promise\TaskQueueInterface</span></a>
            
            
        </dd>
    </dl>








    <div class="info">
        
        
        <b>Namespace:</b> <a href="namespace-GuzzleHttp.html">GuzzleHttp</a>\<a href="namespace-GuzzleHttp.Promise.html">Promise</a><br>
        

            <b>Located at</b> <a href="source-class-GuzzleHttp.Promise.TaskQueue.html#4-66" title="Go to source code">TaskQueue.php</a>
        <br>
    </div>



    <table class="summary methods" id="methods">
    <caption>Methods summary</caption>
    <tr data-order="__construct" id="___construct">

        <td class="attributes"><code>
             public 

            
            
            </code>
        </td>

        <td class="name"><div>
        <a class="anchor" href="#___construct">#</a>
        <code><a href="source-class-GuzzleHttp.Promise.TaskQueue.html#18-31" title="Go to source code">__construct</a>( <span> <var>$withShutdown</var> = <span class="php-keyword1">true</span></span> )</code>

        <div class="description short">
            
        </div>

        <div class="description detailed hidden">
            







        </div>
        </div></td>
    </tr>
    <tr data-order="isEmpty" id="_isEmpty">

        <td class="attributes"><code>
             public 

            boolean
            
            </code>
        </td>

        <td class="name"><div>
        <a class="anchor" href="#_isEmpty">#</a>
        <code><a href="source-class-GuzzleHttp.Promise.TaskQueue.html#33-36" title="Go to source code">isEmpty</a>( )</code>

        <div class="description short">
            <p>Returns true if the queue is empty.</p>
        </div>

        <div class="description detailed hidden">
            <p>Returns true if the queue is empty.</p>



                <h4>Returns</h4>
                <div class="list">
                    boolean
                </div>




                <h4>Implementation of</h4>
                <div class="list"><code><a href="class-GuzzleHttp.Promise.TaskQueueInterface.html#_isEmpty">GuzzleHttp\Promise\TaskQueueInterface::isEmpty()</a></code></div>
        </div>
        </div></td>
    </tr>
    <tr data-order="add" id="_add">

        <td class="attributes"><code>
             public 

            
            
            </code>
        </td>

        <td class="name"><div>
        <a class="anchor" href="#_add">#</a>
        <code><a href="source-class-GuzzleHttp.Promise.TaskQueue.html#38-41" title="Go to source code">add</a>( <span>callable <var>$task</var></span> )</code>

        <div class="description short">
            <p>Adds a task to the queue that will be executed the next time run is
called.</p>
        </div>

        <div class="description detailed hidden">
            <p>Adds a task to the queue that will be executed the next time run is
called.</p>


                <h4>Parameters</h4>
                <div class="list"><dl>
                    <dt><var>$task</var></dt>
                    <dd></dd>
                </dl></div>





                <h4>Implementation of</h4>
                <div class="list"><code><a href="class-GuzzleHttp.Promise.TaskQueueInterface.html#_add">GuzzleHttp\Promise\TaskQueueInterface::add()</a></code></div>
        </div>
        </div></td>
    </tr>
    <tr data-order="run" id="_run">

        <td class="attributes"><code>
             public 

            
            
            </code>
        </td>

        <td class="name"><div>
        <a class="anchor" href="#_run">#</a>
        <code><a href="source-class-GuzzleHttp.Promise.TaskQueue.html#43-49" title="Go to source code">run</a>( )</code>

        <div class="description short">
            <p>Execute all of the pending task in the queue.</p>
        </div>

        <div class="description detailed hidden">
            <p>Execute all of the pending task in the queue.</p>







                <h4>Implementation of</h4>
                <div class="list"><code><a href="class-GuzzleHttp.Promise.TaskQueueInterface.html#_run">GuzzleHttp\Promise\TaskQueueInterface::run()</a></code></div>
        </div>
        </div></td>
    </tr>
    <tr data-order="disableShutdown" id="_disableShutdown">

        <td class="attributes"><code>
             public 

            
            
            </code>
        </td>

        <td class="name"><div>
        <a class="anchor" href="#_disableShutdown">#</a>
        <code><a href="source-class-GuzzleHttp.Promise.TaskQueue.html#51-65" title="Go to source code">disableShutdown</a>( )</code>

        <div class="description short">
            <p>The task queue will be run and exhausted by default when the process
exits IFF the exit is not the result of a PHP E_ERROR error.</p>
        </div>

        <div class="description detailed hidden">
            <p>The task queue will be run and exhausted by default when the process
exits IFF the exit is not the result of a PHP E_ERROR error.</p>

<p>You can disable running the automatic shutdown of the queue by calling
this function. If you disable the task queue shutdown process, then you
MUST either run the task queue (as a result of running your event loop
or manually using the run() method) or wait on each outstanding promise.</p>

<p>Note: This shutdown will occur before any destructors are triggered.</p>







        </div>
        </div></td>
    </tr>
    </table>


















</div>

    <div id="footer">
        ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK API documentation generated by <a href="http://apigen.org">ApiGen</a>
    </div>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>