wenfengwang commented on a change in pull request #2: Make code be consistent 
with Golang Specfication
URL: https://github.com/apache/rocketmq-client-go/pull/2#discussion_r234650022
 
 

 ##########
 File path: core/cfuns.go
 ##########
 @@ -14,15 +14,37 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package client
+package rocketmq
 
-//#cgo CFLAGS: -I/usr/local/include/rocketmq
-//#cgo LDFLAGS: -L/usr/local/lib -lrocketmq
-//#include "CMessageExt.h"
-//#include "CPushConsumer.h"
+/*
+#cgo LDFLAGS: -L/usr/local/lib -lrocketmq
+#include "rocketmq/CMessageExt.h"
+#include "rocketmq/CPushConsumer.h"
+*/
 import "C"
+import (
+       "sync"
+)
+
+var pushConsumerMap = make(map[*C.CPushConsumer]*defaultPushConsumer)
 
 Review comment:
   actually, all or most access map is read, so read-write lock is better. and 
i'm not sure can't subscribe topic after consumer started, if it is true, the 
mutex can be removed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to