Created
June 9, 2020 17:36
-
-
Save ultimagriever/15a4f4fe289b95a33ebe4ab76f65747b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function conectar() { | |
// aqui vai toda a rotina de connect... | |
mysql_connect(....); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'conectar.php' | |
class ConectarThread extends Thread { | |
public function run() { | |
// fazer a conexão aqui | |
conectar(); | |
} | |
} | |
$conexoes = []; | |
for ($i = 0; $i < 4096; $i++) { | |
$conexoes[$i] = new ConectarThread($i); | |
$conexoes[$i]->start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment