Skip to content

Implemented some experimental event loops with nextTick() support. #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Dec 5, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
db41311
Implemented some experimental event loops with nextTick() support.
jmalloc Nov 13, 2013
cbe3664
Trying installion of ext-event in travis configuration.
jmalloc Nov 13, 2013
f0fb0af
Changed StreamSelectNextTickLoop to use existing Timers implementation.
jmalloc Nov 13, 2013
abbb05d
Removed AbstractNextTickLoop::streamKey()
jmalloc Nov 13, 2013
75b496a
Abstracted the actual next-tick queue into it's own class.
jmalloc Nov 13, 2013
35e4cd0
Reduced method dispatching somewhat.
jmalloc Nov 13, 2013
7fac0d3
Favour isset() over array_key_exists().
jmalloc Nov 13, 2013
514d05b
Removed NextTickLoopInterface, AbstractNextTickLoop and renamed Strea…
jmalloc Nov 14, 2013
85d0bcc
Various changes as per comments in PR.
jmalloc Nov 15, 2013
93da5ec
Fixed and added test-case for next-tick events added by timers.
jmalloc Nov 15, 2013
dc43f53
Removed some unnecessary left-overs.
jmalloc Nov 15, 2013
a8af7bc
Use status for unused parameters.
jmalloc Nov 15, 2013
18a00c7
Added nextTick() support to LibEventLoop (based off ExtEventLoop).
jmalloc Nov 18, 2013
3bba9e4
Renamed NextTick namespace to Tick + enable ExtEventLoop tests for Li…
jmalloc Nov 18, 2013
74131f7
Added nextTick() support to LibEvLoop.
jmalloc Nov 18, 2013
17c378f
Use 'inheritdoc' for methods from LoopInterface.
jmalloc Nov 21, 2013
7d7dd65
Code style.
jmalloc Nov 21, 2013
a8fe3cf
Added callable type-hint to LoopInterface, use SplQueue::isEmpty().
jmalloc Nov 21, 2013
0ac0305
Simplification of LibEvLoop.
jmalloc Nov 21, 2013
3ac92ee
Added @-operator error suppression to EventBase::loop() calls.
jmalloc Nov 21, 2013
87d2207
Code style.
jmalloc Nov 21, 2013
cae3165
Add 1µs minimum interval to Timer, and remove Timers::MIN_RESOLUTION.
jmalloc Nov 22, 2013
c0cd613
Changed protected methods in event-loop implementations to private.
jmalloc Dec 1, 2013
edc337e
Removed ExtEventLoop
jmalloc Dec 4, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed protected methods in event-loop implementations to private.
  • Loading branch information
jmalloc committed Dec 1, 2013
commit c0cd61336f1e7c550b8f9ccd99934e63a427502b
10 changes: 5 additions & 5 deletions src/React/EventLoop/ExtEventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function stop()
*
* @param TimerInterface $timer
*/
protected function scheduleTimer(TimerInterface $timer)
private function scheduleTimer(TimerInterface $timer)
{
$flags = Event::TIMEOUT;

Expand All @@ -220,7 +220,7 @@ protected function scheduleTimer(TimerInterface $timer)
* @param stream $stream
* @param integer $flag Event::READ or Event::WRITE
*/
protected function subscribeStreamEvent($stream, $flag)
private function subscribeStreamEvent($stream, $flag)
{
$key = (int) $stream;

Expand All @@ -247,7 +247,7 @@ protected function subscribeStreamEvent($stream, $flag)
* @param stream $stream
* @param integer $flag Event::READ or Event::WRITE
*/
protected function unsubscribeStreamEvent($stream, $flag)
private function unsubscribeStreamEvent($stream, $flag)
{
$key = (int) $stream;

Expand All @@ -273,7 +273,7 @@ protected function unsubscribeStreamEvent($stream, $flag)
* to prevent "Cannot destroy active lambda function" fatal error from
* the event extension.
*/
protected function createTimerCallback()
private function createTimerCallback()
{
$this->timerCallback = function ($_, $_, $timer) {
call_user_func($timer->getCallback(), $timer);
Expand All @@ -291,7 +291,7 @@ protected function createTimerCallback()
* to prevent "Cannot destroy active lambda function" fatal error from
* the event extension.
*/
protected function createStreamCallback()
private function createStreamCallback()
{
$this->streamCallback = function ($stream, $flags) {
$key = (int) $stream;
Expand Down
10 changes: 5 additions & 5 deletions src/React/EventLoop/LibEventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function stop()
*
* @param TimerInterface $timer
*/
protected function scheduleTimer(TimerInterface $timer)
private function scheduleTimer(TimerInterface $timer)
{
$this->timerEvents[$timer] = $event = event_timer_new();

Expand All @@ -222,7 +222,7 @@ protected function scheduleTimer(TimerInterface $timer)
* @param stream $stream
* @param integer $flag EV_READ or EV_WRITE
*/
protected function subscribeStreamEvent($stream, $flag)
private function subscribeStreamEvent($stream, $flag)
{
$key = (int) $stream;

Expand Down Expand Up @@ -252,7 +252,7 @@ protected function subscribeStreamEvent($stream, $flag)
* @param stream $stream
* @param integer $flag EV_READ or EV_WRITE
*/
protected function unsubscribeStreamEvent($stream, $flag)
private function unsubscribeStreamEvent($stream, $flag)
{
$key = (int) $stream;

Expand All @@ -278,7 +278,7 @@ protected function unsubscribeStreamEvent($stream, $flag)
* to prevent "Cannot destroy active lambda function" fatal error from
* the event extension.
*/
protected function createTimerCallback()
private function createTimerCallback()
{
$this->timerCallback = function ($_, $_, $timer) {
call_user_func($timer->getCallback(), $timer);
Expand Down Expand Up @@ -308,7 +308,7 @@ protected function createTimerCallback()
* to prevent "Cannot destroy active lambda function" fatal error from
* the event extension.
*/
protected function createStreamCallback()
private function createStreamCallback()
{
$this->streamCallback = function ($stream, $flags) {
$key = (int) $stream;
Expand Down
2 changes: 1 addition & 1 deletion src/React/EventLoop/StreamSelectLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function stop()
/**
* Wait/check for stream activity, or until the next timer is due.
*/
protected function waitForStreamActivity($timeout)
private function waitForStreamActivity($timeout)
{
$read = $this->readStreams;
$write = $this->writeStreams;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy