Comments (3)
@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.
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.
@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)
- Can section on supervisors and genservers be simplified? HOT 2
- Link to exenv repo seems to be broken/project may no longer exist HOT 1
- Tree-sitter playground is broken HOT 1
- Translating Elixir Guides HOT 4
- elixir-companies.com app is down HOT 1
- Escaping section is outdate HOT 2
- Small reordering of information in "alias, require, and import" HOT 2
- Bad link in "Mix and OTP" EPUB HOT 1
- IO and the file system HOT 3
- Debian flavors alternative installation HOT 2
- Since Elixir 1.15 :observer and :debugger need to be mentioned in the `mix.exs` to work in iex HOT 8
- The match operator no longer throws an error: Unknown function undefined.
- Add a bit more detail about erlang modules and elixir atoms HOT 3
- Optional dark mode HOT 1
- Normalise font size to 16px HOT 1
- Should there be a PagerDuty case study? HOT 1
- Observer docs ask to use unavailable Mix function HOT 2
- Add license HOT 1
- Dark mode support HOT 1
- Broken link/redirect after #1738 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elixir-lang.github.com.