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 2021/04/12 18:53:34 UTC
[plc4x] branch develop updated: plc4go: fixed build
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new eba1194 plc4go: fixed build
eba1194 is described below
commit eba11943c523a42758a0f65ed7309ac18b9e4185
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Apr 12 20:53:13 2021 +0200
plc4go: fixed build
---
plc4go/internal/plc4go/spi/RequestTransactionManager.go | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/plc4go/internal/plc4go/spi/RequestTransactionManager.go b/plc4go/internal/plc4go/spi/RequestTransactionManager.go
index ae7105c..c4733f4 100644
--- a/plc4go/internal/plc4go/spi/RequestTransactionManager.go
+++ b/plc4go/internal/plc4go/spi/RequestTransactionManager.go
@@ -131,15 +131,24 @@ func (e Executor) stop() {
type CompletionFuture struct {
cancelRequested bool
interruptRequested bool
+ completed bool
+ errored bool
}
func (f CompletionFuture) cancel(interrupt bool) {
f.cancelRequested = true
f.interruptRequested = interrupt
+ f.errored = true
}
func (f CompletionFuture) complete() {
- // TODO: implement me
+ f.completed = true
+}
+
+func (f CompletionFuture) AwaitCompletion() {
+ for !f.completed || !f.errored {
+ time.Sleep(time.Millisecond * 10)
+ }
}
type RequestTransaction struct {
@@ -304,8 +313,8 @@ func (t *RequestTransaction) hashCode() int32 {
func NewTransactionOperation(transactionId int32, delegate Runnable) Runnable {
return func() {
- log.Trace().Int32("transactionId", transactionId).Msgf("Start execution of transaction %s", transactionId)
+ log.Trace().Int32("transactionId", transactionId).Msgf("Start execution of transaction %d", transactionId)
delegate()
- log.Trace().Int32("transactionId", transactionId).Msgf("Completed execution of transaction {}", transactionId)
+ log.Trace().Int32("transactionId", transactionId).Msgf("Completed execution of transaction %d", transactionId)
}
}