ID:               50737
 Updated by:       j...@php.net
 Reported By:      jason at lentink dot net
-Status:           Open
+Status:           Feedback
-Bug Type:         Sockets related
+Bug Type:         Streams related
 Operating System: Linux
 PHP Version:      5.2.12
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2010-01-13 09:58:52] jason at lentink dot net

Description:
------------
When using stream_set_blocking on a stream will create a huge load on 
cpu. When using this function it uses up to 50% of the cpu. When not 
using this function it will only use 0.1% cpu usage.

Reproduce code:
---------------
$this->_socket = fsockopen($str, $port, $errno, $errstr);
stream_set_blocking($this->_socket, 0); // non blocking

Expected result:
----------------
An socket which will be opened fast. in a non-blocking mode.

Actual result:
--------------
An open socket. But the cpu use is enormous.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50737&edit=1

Reply via email to