Comments (1)
Upon further thought I'm not sure this is possible. The data structure needs stable iterators into the nodes of the map, something priority queue cannot guarantee. It could be possible to keep the nodes that the priority queue point to alive until the timeout triggers and check to see if the response was already received and then throw away the timeout, but this has the disadvantage of the timeout always triggering rather than only triggering if the response hasn't been received yet. It also has the downside of pinning the response object within the event loop until the timeout fires, possibly using more memory and/or lifetime issues with the user of the library. I think its safe to say the overhead of the std::multimap is most likely worth it to avoid all these problems.
from liblifthttp.
Related Issues (20)
- Switch to std style naming, e.g. everything snake_case?
- Adjust clang-format styling to custom settings
- Adjust atomics to use correct std::memory_order
- Update benchmarks after atomic change
- Add support for CURLOPT_CONNECTTIMEOUT_MS
- Add lgtm integration support
- Auto clang-format on commit and update readme.cpp
- Add callback hook for on event loop thread creation
- Rename lift::event_loop to lift::client
- Streaming CONNECT_ONLY sockets HOT 2
- Use recursive locks for lift::share
- Add std::future on client async request
- C++ 20 coroutines for async requests
- Async requests always segfaults HOT 12
- Switch to semver versioning HOT 1
- Switch to `main` from `master` for default branch. HOT 1
- remove lgtm in readme
- Add CI Matrix for fedora
- lift::client destructor infinite loop HOT 15
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 liblifthttp.