View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ivan Ratnikov > HTTP-Server-EV-0.5 > HTTP::Server::EV::BufTie



Annotate this POD


New  1
Open  1
View/Report Bugs
Module Version: 0.5   Source   Latest Release: HTTP-Server-EV-0.69


HTTP::Server::EV::BufTie - Internal class used by HTTP::Server::EV::CGI for proxifying output to correct HTTP::Server::EV::Buffer.


Mainly it`s workaround for bug of localizing *STDOUT(no only it, all global vars also) in Coro threads, when calling HTTP::Server::EV::CGI->attach(local *STDOUT) overwrites STDOUT in all now runing coros. That happens because local() doesn`t create lexical copy of var, it pushes old value to stack and sets new value to glob var, old value is restored when interpreter leaves the scope. So localizing variable in one coro overwrites it in all other.


One coro thread - one socket. All handles attached in coro thread will refer to one socket that attached to filehandle last. It`s possible to support attaching different sockets to different handles in same coro thread by constructing tie object on flow, but it slow and generally needn't, so not implemented.

syntax highlighting: