Pauses the input stream.
@return $this
11592
public function pause()
    {
        if ($this->paused) { return $this; }
        $this->input->pause();
        $this->paused = true;
        $this->emit('pause');
        return $this;
    }
904624
public function pause()
    {
        $ResqueStatus = $this->ResqueStatus;

        $activeWorkers = call_user_func(self::$Resque_Worker . '::all');
        array_walk(
            $activeWorkers,
            function (&$worker) {
                return $worker = (string)$worker;
            }
        );
        $pausedWorkers = call_user_func(array($this->ResqueStatus, 'getPausedWorker'));

        $this->debug('Searching for active workers');
        $options = new SendSignalCommandOptions();
        $options->title = 'Pausing workers';
        $options->noWorkersMessage = 'There is no workers to pause';
        $options->allOption = 'Pause all workers';
        $options->selectMessage = 'Worker to pause';
        $options->actionMessage = 'pausing';
        $options->workers = array_diff($activeWorkers, $pausedWorkers);
        $options->signal = 'USR2';
        $options->successCallback = function ($pid, $workerName) use ($ResqueStatus) {
            $ResqueStatus->setPausedWorker($workerName);
        };
        $options->schedulerWorkerActionMessage = 'Pausing the Scheduler Worker';

        $this->sendSignal($options);
    }
1321856
public function run()
	{
		$this->connect();

		try
		{
			while (!$this->feof())
			{
				$data = $this->irc_read(60); // We wait 60 seconds but it's arbitrary and can be safely modified...
				if ($data === false)
				{
					continue;
				}

				$this->callListeners($data);
			}
		}
		catch (SocketDisconnectedException $e)
		{
			return $this;
		}

		return $this;
	}
478887
public function clearLine()
    {
        if (!$this->isClearLineEnabled()) {
            return $this;
        }

        $this->cursorReset();
        $this->write(str_repeat(' ', $this->getTerminalWidth()));
        $this->cursorReset();

        $this->disableClearLine();

        return $this;
    }
1338884
protected function _startBufferToMessages()
    {
        if (!Mage::getStoreConfigFlag('system/cron/enableJobOutputBuffer')) {
            return $this;
        }

        if ($this->_redirect) {
            return $this;
        }

        $this->addMessages('---START---' . PHP_EOL);

        ob_start(
            array($this, '_addBufferToMessages'),
            $this->_redirectOutputHandlerChunkSize
        );

        $this->_redirect = true;

        return $this;
    }
741143
function pause (stream) {
  var events = []
  var onData = createEventListener('data', events)
  var onEnd = createEventListener('end', events)

  // buffer data
  stream.on('data', onData)

  // buffer end
  stream.on('end', onEnd)

  return {
    end: function end () {
      stream.removeListener('data', onData)
      stream.removeListener('end', onEnd)
    },
    resume: function resume () {
      this.end()

      for (var i = 0; i < events.length; i++) {
        stream.emit.apply(stream, events[i])
      }
    }
  }
}
638309
public function disableHttpsTransformOnHttpsConnections(): self
    {
        $this->needsCompile = ($this->needsCompile || $this->httpsTransformOnHttpsConnections !== false);
        $this->httpsTransformOnHttpsConnections = false;

        return $this;
    }
951979
protected function startListening()
	{
		foreach ($this->eventsToListenFor as $event) {
			if (is_callable([$this, $event])) {
				$this->connection->eventManager()->bind($event, [$this, $event]);
			}
		}
		return $this;
	}
594716
protected function fill()
    {
        $readFilterCallback = $this->readFilterCallback;
        $this->buffer .= $readFilterCallback($this->stream->read(self::BUFFER_SIZE));

        if ($this->stream->eof()) {
            $this->buffer .= $readFilterCallback();
        }
    }
1136866
public function listen()
    {
        $input     = null;
        $inputJSON = file_get_contents('php://input');
        if (strlen($inputJSON)) {
            $input     = json_decode($inputJSON, TRUE); //convert JSON into array
            $lastError = json_last_error();
            if ($lastError) {
                $this->addStatusMessage(json_last_error_msg(), 'warning');
            }
        }
        return $input;
    }
770869
public function doRead()
    {
        $data = fread($this->stream, static::READ_CHUNK_SIZE);

        if ($data === '') {
            fclose($this->stream);
            $this->stream = null; //fclose() will only leave stream resource in unknown state

        } elseif ($this->isDegenerated === false) {
            $this->readBuffer .= $data;

            //For explanation read "important note" for processInputBuffer()
            //@formatter:off
            while ($this->processInputBuffer() === false);
            //@formatter:on
        }
    }
877421
public function pauseRecv()
    {
        Worker::$globalEvent->del($this->_socket, EventInterface::EV_READ);
        $this->_isPaused = true;
    }
87035
public function clearErrorOutput()
    {
        ftruncate($this->stderr, 0);
        fseek($this->stderr, 0);
        $this->incrementalErrorOutputOffset = 0;

        return $this;
    }
265013
public function withoutRedirecting(): self
    {
        return tap($this, function ($request) {
            return $this->options = array_merge_recursive($this->options, [
                'allow_redirects' => false,
            ]);
        });
    }
635756
public function clear()
    {
        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        $_SESSION = array();

        return $this;
    }
367071
private PauseResult<PersistableUpload> pause(
            final boolean forceCancelTransfers) throws AmazonClientException {
        UploadMonitor uploadMonitor = (UploadMonitor) monitor;
        return uploadMonitor.pause(forceCancelTransfers);
    }
648196
public function disconnect()
    {
        if (null !== $this->_ssh_resource) {
            $this->exec('echo "EXITING" && exit;');
            $this->_ssh_resource = null;
            $this->_sftp_resource = null;
        }

        return $this;
    }