3 ms·
The server isn't single threaded. It uses the dispatch concurrent thread pool for processing. The (granted, ugly) line you've linked is for blocking and keeping
by gilgoomesh 11y ago
The server isn't single threaded. It uses the dispatch concurrent thread pool for processing. The (granted, ugly) line you've linked is for blocking and keeping the main thread alive so the process doesn't end. However, the requests are processed on the dispatch "Background" queue. See "boot" here:
https://github.com/tannernelson/vapor/blob/master/Sources/SocketServer.swift#L21 https://github.com/tannernelson/vapor/blob/master/Sources/So...