You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2016/10/18 18:03:15 UTC

[1/2] qpid-proton git commit: NO-JIRA: go: fix parallel build from scratch

Repository: qpid-proton
Updated Branches:
  refs/heads/master 05deba72e -> 3569e03b2


NO-JIRA: go: fix parallel build from scratch

Fixed example build dependencies to ensure the examples are not built
concurrently with the go packages they depend on. This was happening frequently
and causing errors in a parallel build from scratch.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d91131a2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d91131a2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d91131a2

Branch: refs/heads/master
Commit: d91131a2b873260f0490b49895e7c1c868d40906
Parents: 05deba7
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Oct 18 13:25:27 2016 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Oct 18 14:01:46 2016 -0400

----------------------------------------------------------------------
 examples/go/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d91131a2/examples/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/go/CMakeLists.txt b/examples/go/CMakeLists.txt
index 868b780..c9aba01 100644
--- a/examples/go/CMakeLists.txt
+++ b/examples/go/CMakeLists.txt
@@ -32,7 +32,7 @@ if(BUILD_GO)
     add_custom_target(${target} ALL
       COMMAND ${GO_BUILD} ${GO_EXAMPLE_FLAGS} -o ${output} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.go
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-      DEPENDS qpid-proton)
+      DEPENDS go-build)
     list(APPEND example_targets ${target})
   endforeach()
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-proton git commit: PROTON-1309: go: set outgoing message window via electron interface.

Posted by ac...@apache.org.
PROTON-1309: go: set outgoing message window via electron interface.

Added a session option and IncomingSession setter for outgoing window.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/3569e03b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/3569e03b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/3569e03b

Branch: refs/heads/master
Commit: 3569e03b28b0f82c5a4e1004be6684f628c15aa8
Parents: d91131a
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Oct 18 14:00:35 2016 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Oct 18 14:01:52 2016 -0400

----------------------------------------------------------------------
 .../go/src/qpid.apache.org/electron/session.go  | 35 +++++++++++++-------
 1 file changed, 23 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3569e03b/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/session.go b/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
index 66a8995..6dae354 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
@@ -36,17 +36,24 @@ type Session interface {
 
 type session struct {
 	endpoint
-	pSession   proton.Session
-	connection *connection
-	capacity   uint
+	pSession                         proton.Session
+	connection                       *connection
+	incomingCapacity, outgoingWindow uint
 }
 
 // SessionOption can be passed when creating a Session
 type SessionOption func(*session)
 
 // IncomingCapacity returns a Session Option that sets the size (in bytes) of
-// the sessions incoming data buffer..
-func IncomingCapacity(cap uint) SessionOption { return func(s *session) { s.capacity = cap } }
+// the session's incoming data buffer.
+func IncomingCapacity(bytes uint) SessionOption {
+	return func(s *session) { s.incomingCapacity = bytes }
+}
+
+// OutgoingWindow returns a Session Option that sets the outgoing window size (in frames).
+func OutgoingWindow(frames uint) SessionOption {
+	return func(s *session) { s.outgoingWindow = frames }
+}
 
 // in proton goroutine
 func newSession(c *connection, es proton.Session, setting ...SessionOption) *session {
@@ -59,7 +66,8 @@ func newSession(c *connection, es proton.Session, setting ...SessionOption) *ses
 		set(s)
 	}
 	c.handler.sessions[s.pSession] = s
-	s.pSession.SetIncomingCapacity(s.capacity)
+	s.pSession.SetIncomingCapacity(s.incomingCapacity)
+	s.pSession.SetOutgoingWindow(s.outgoingWindow)
 	s.pSession.Open()
 	return s
 }
@@ -108,21 +116,24 @@ func (s *session) Receiver(setting ...LinkOption) (rcv Receiver, err error) {
 // incoming request to open a session.
 type IncomingSession struct {
 	incoming
-	h        *handler
-	pSession proton.Session
-	capacity uint
+	h                                *handler
+	pSession                         proton.Session
+	incomingCapacity, outgoingWindow uint
 }
 
 func newIncomingSession(h *handler, ps proton.Session) *IncomingSession {
 	return &IncomingSession{incoming: makeIncoming(ps), h: h, pSession: ps}
 }
 
-// SetCapacity sets the session buffer capacity of an incoming session in bytes.
-func (in *IncomingSession) SetCapacity(bytes uint) { in.capacity = bytes }
+// SetIncomingCapacity sets the session buffer capacity of an incoming session in bytes.
+func (in *IncomingSession) SetIncomingCapacity(bytes uint) { in.incomingCapacity = bytes }
+
+// SetOutgoingWindow sets the session outgoing window of an incoming session in frames.
+func (in *IncomingSession) SetOutgoingWindow(frames uint) { in.outgoingWindow = frames }
 
 // Accept an incoming session endpoint.
 func (in *IncomingSession) Accept() Endpoint {
 	return in.accept(func() Endpoint {
-		return newSession(in.h.connection, in.pSession, IncomingCapacity(in.capacity))
+		return newSession(in.h.connection, in.pSession, IncomingCapacity(in.incomingCapacity), OutgoingWindow(in.outgoingWindow))
 	})
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org