We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe524ff commit 3226cc2Copy full SHA for 3226cc2
src/bridge.h
@@ -145,7 +145,7 @@ class BridgeClass {
145
} else {
146
k_yield();
147
}
148
- }
+ }
149
150
// Lock read mutex
151
while(true) {
@@ -168,7 +168,14 @@ class BridgeClass {
168
169
template<typename... Args>
170
void notify(const MsgPack::str_t method, Args&&... args) {
171
- client->notify(method, std::forward<Args>(args)...);
+ while (true) {
172
+ if (k_mutex_lock(&write_mutex, K_MSEC(10)) == 0) {
173
+ client->notify(method, std::forward<Args>(args)...);
174
+ k_mutex_unlock(&write_mutex);
175
+ break;
176
177
+ k_yield();
178
179
180
181
String get_error_message() const {
0 commit comments