Comments (2)
An obvious way to implement the concurrency in this seems to be with thread pools and task queues, and it shouldn't be hard. The other obvious option is just to have one OS thread per request but this should only be temporary due to its inefficient nature. We could leave the number of threads in the pool to be fine tuned allowing for the kind of hard limits you are talking about.
from simple-http-server.
I agree. There is a set number of threads in a pool, and the tasks are queued. Threads take the next task in the queue, execute that task, and then pick up the next task in the queue. So basically we would need to implement queue and thread pool types. Maybe we should make a 'utils' folder for these utility objects. It would not be one thread per connection/request in this case but rather a thread executing a task from the queue.
from simple-http-server.
Related Issues (13)
- Create Base Project Directory Structure
- Create HashMap Library HOT 3
- Create generic resizeable array implementation
- Improved logging in the testing framework HOT 1
- Add Functions to Linked List Implementation
- Create Basic HTTP POST Parsing for HTTP lib
- Replace Existing Unit Testing Unity/CMock utility
- Add Build Instructions For Cmake to README.md
- Create easy, automated way to run unit tests. HOT 2
- Create Queue Library HOT 4
- Create Task Structure Library HOT 3
- Create String Library HOT 2
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 simple-http-server.