Skip to content

Instantly share code, notes, and snippets.

View steverhoades's full-sized avatar

Steve Rhoades steverhoades

View GitHub Profile
@steverhoades
steverhoades / gist:c7d2528491418bd06bd5
Created August 25, 2014 20:47
Blocking test with Event extension
<?php
require __DIR__ . '/../vendor/autoload.php';
/** @var $loop \React\EventLoop\ExtEventLoop */
$cfg = new \EventConfig();
$cfg->requireFeatures(\EventConfig::FEATURE_FDS);
$loop = new \React\EventLoop\ExtEventLoop($cfg);
$dir = getcwd();
$fd = fopen($dir . DIRECTORY_SEPARATOR . 'largefile', "r");