Coder Social home page Coder Social logo

Comments (3)

josevalim avatar josevalim commented on July 17, 2024

@tallakt Thanks for the feedback. Can you please detail why it is confusing? The final solution needs to have two recursive loops and that's how an actual web server / tcp acceptor would work. The acceptor needs to loop for new connections and the multiple request/responses can be sent in the same connection. Maybe we need more detailed comments?

from elixir-lang.github.com.

tallakt avatar tallakt commented on July 17, 2024

I just looked at the code and could not make out why you had two loops, when the inner loop could not ever exit. I guess what I would have expected is that you added the outer loop in the later examples where it became necessary. But i guess it's no big deal.

Another note on the same thing; i think learn you some erlang spawned a new process for the next accept, handling the requests in the original 'accept' process. The reasoning being that you could respond without a context switch. If that code is indeed better, could be an idea to do it like that here as well.. Also no big deal..

from elixir-lang.github.com.

josevalim avatar josevalim commented on July 17, 2024

@tallakt I see your point now. I will check which approach is better, to add the outer loop later or at the beginning. Adding it at the beginning means we need to do fewer changes later on, but as you described, it may cause confusion. I think I mention early on the fact we get stuck with just one request is a bug that we aim to fix.

Thanks!

from elixir-lang.github.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.