Modify fiber's readme

This commit is contained in:
zhengshuxin 2023-01-26 16:15:11 +08:00
parent 8224e8888a
commit 846358ee6f

View File

@ -310,12 +310,12 @@ int main(void) {
}
// Create one server coroutine to wait for connection.
go[&] {
go[=, &server] {
while (true) {
acl::socket_stream* conn = server.accept();
if (conn) {
// Create one client coroutine to handle the connection.
go[=] {
go[conn] {
char buf[256];
while (true) {
int ret = conn->read(buf, sizeof(buf), false);