You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/01/12 11:14:38 UTC
[incubator-plc4x] 01/06: Put the await into a while loop to handle
"spurious wakeup"
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
commit 36d151f1ba686052e636123e17d3f60a300d63c0
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jan 12 11:52:53 2018 +0100
Put the await into a while loop to handle "spurious wakeup"
---
.../main/java/org/apache/plc4x/java/api/messages/items/RequestItem.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/items/RequestItem.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/items/RequestItem.java
index 5932f91..fdad7f9 100644
--- a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/items/RequestItem.java
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/items/RequestItem.java
@@ -57,7 +57,7 @@ public abstract class RequestItem<DATA_TYPE, RESPONSE_ITEM extends ResponseItem>
if (responseItem == null) {
try {
lock.lock();
- if (responseItem == null) {
+ while (responseItem == null) {
responseSet.await();
}
} catch (InterruptedException e) {
--
To stop receiving notification emails like this one, please contact
"commits@plc4x.apache.org" <co...@plc4x.apache.org>.