Skip to main content Link Menu Expand (external link) Document Search Copy Copied

This is automatic generated document for things in Swow\Selector class

Class Selector

channel selector selects any action done which action can be “pushing/poping T into/from (may be different) channel”

This class is a generic class. Template T


public EVENT_POP = 1 public EVENT_PUSH = 0


Method commit

public function commit ( int $timeout ) : \Swow\Channel<T>

do select

any actions in selector will make this return

content switching may happen here

Param int $timeout timeout in microseconds

Method fetch

public function fetch ( ) : mixed

Method getLastEvent

public function getLastEvent ( ) : int

Method pop

public function pop ( \Swow\Channel<T> $channel ) : static

add a “popping a T from $channel” action into selector

Method push

public function push ( \Swow\Channel<T> $channel , T $data ) : static

add a “pushing a T into $channel” action into selector

Copyright 2022 the Swow contributors