The short answer is I don’t know, but the code looks like it is creating a thread for each accepted connection. You can find out by looking at how sys_thread_new() is implemented, or even placing a break point on that line and stepping into the function.
The accept() call is used by a server to accept a connection request from a client. When a connection is available, the socket created is ready for use to read data from the process that requested the connection. The call accepts the first connection on its queue of pending connections for the given socket socket. The accept() call creates a new socket descriptor with the same properties as socket and returns it to the caller. If the queue has no pending connection requests, accept() blocks the caller unless socket is in nonblocking mode. If no connection requests are queued and socket is in nonblocking mode, accept() returns -1 and sets the error code to EWOULDBLOCK. The new socket descriptor cannot be used to accept new connections. The original socket, socket, remains available to accept more connection requests.
The code you posted shows a task being created, which was your original question, so I’m not sure if you still have a question. I’m not sure if you still have a question.