We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60280f0 commit f516fedCopy full SHA for f516fed
include/hicr/frontends/RPCEngine/RPCEngine.hpp
@@ -190,11 +190,14 @@ class RPCEngine
190
*/
191
__INLINE__ bool tryListen()
192
{
193
+ // If there are messages to process early return
194
+ if (_RPCConsumerChannel->getDepth() > 0) return true;
195
+
196
// If the channel is empty, check if new messages arrived since last check
- if (_RPCConsumerChannel->getDepth() == 0) _RPCConsumerChannel->updateDepth();
197
+ _RPCConsumerChannel->updateDepth();
198
199
// Return whether there are new messages
- return _RPCConsumerChannel->getDepth() == 0;
200
+ return _RPCConsumerChannel->getDepth() > 0;
201
}
202
203
__INLINE__ void parseAndExecuteRPC()
0 commit comments