Why does swoole support both cooperation and async?

take mysql-client as an example. Swoole provides the following two ways

  • form of CoroutineMySQL, protocol
  • swoole_mysql, asynchronous form

Why does swoole offer both forms?

`swoole_server``swoole_http_server`

* `onRequet``onReceive``onConnect` 
* `onConnect``onReceive``onClose`

that"s not going to use asynchronous Mysql in onRequest.

Mar.30,2021

Synergy and asynchrony are not the same thing, you can learn about this. In addition, swoole collaboration programs are available only at the beginning of 2, and have existed before asynchrony.


Asynchronous implementation is early, and now it is mainly recommended to use co-programming

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34758-2bf2b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34758-2bf2b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?