mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Edit changelog/1.4.0.md
This commit is contained in:
parent
82deb5be2e
commit
33d6d93ae2
@ -7,6 +7,7 @@ Feel free to ask questions - [Chat on Gitter!](https://gitter.im/oatpp-framework
|
||||
Contents:
|
||||
|
||||
- [URL Encoder And Decoder](#url-encoder-and-decoder)
|
||||
- [Introduce async::ConditionVariable](#async-condition-variable)
|
||||
|
||||
|
||||
## URL Encoder And Decoder
|
||||
@ -25,3 +26,24 @@ auto decoded = oatpp::encoding::Url::decode(encoded);
|
||||
OATPP_ASSERT(decoded == data);
|
||||
```
|
||||
**Note**: Oat++ does NOT automatically decode URL and its parameters on endpoint hit.
|
||||
|
||||
## Async Condition Variable
|
||||
|
||||
```cpp
|
||||
#include "oatpp/core/async/ConditionVariable.hpp"
|
||||
|
||||
...
|
||||
|
||||
oatpp::async::Lock* m_lock;
|
||||
oatpp::async::ConditionVariable* m_cv;
|
||||
|
||||
...
|
||||
|
||||
Action act() override {
|
||||
return m_cv->waitFor(m_lock, // async::Lock
|
||||
[this]{return m_resource->counter == 100;}, // condition
|
||||
std::chrono::seconds(5)) // timeout
|
||||
.next(finish());
|
||||
}
|
||||
...
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user