Hi All,<br>  for SwiftR, I've been looking at trying to implement a multi-threaded server in Swift, but haven't been quite sure how to go about it.<br><br>Basically I want to write something that sits in a loop, reading requests from a named pipe on the file system, and forking off threads to handle the request.<br>
Something like:<br><br>iterate {<br>  request = readData(inputFile)  // block until data available<br>  handleRequest(request) // do all the work in a new thread.<br>}<br><br>My problem is that my (shaky) understanding is that iterate has sequential semantics - that all of the statements within the loop body must finish before the next iteration of the loop starts, which would mean only one request was processed at a time.  Am I correct in my understanding?  If so, is there a workaround where I could get it to fork off threads like this?<br>
<br>- Tim<br>