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_r234960250
########## 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: yes, you are right. i found sync.Map faster than map-RWMutex pair about 20%, so i replaced all pairs with sync.Map. A useless word: i hate type assertion :(. ---------------------------------------------------------------- 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
