func FactoryDefault(ident string, cb FactoryF) { v := C.CString(ident) r := C.gomsgque_FactoryDefault(v, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(v)) iErrorFactoryToGoWithCheck(r) lockFactory[&cb] = true }
func (this *MqS) SendEND_AND_CALLBACK2(token string, cb Service2) { t := C.CString(token) r := C.gomsgque_SendEND_AND_CALLBACK2((*_Ctype_struct_MqS)(this), t, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(t)) this.iErrorMqToGoWithCheck(r) incrService2Ref(&cb) }
func FactoryAdd(ident string, cb FactoryF) { v := C.CString(ident) r := C.gomsgque_FactoryAdd(v, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(v)) iErrorFactoryToGoWithCheck(r) incrFactoryRef(&cb) }
func FactoryNew(ident string, cb FactoryF) *MqS { v := C.CString(ident) out := C.gomsgque_FactoryNew(v, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(v)) iErrorFactoryToGoWithCheck(out.ret) lockFactory[&cb] = true return (*MqS)(out.ctx) }
//export CreateThread func CreateThread(data *_Ctype_struct_MqSysServerThreadMainS) *chan bool { chn := make(chan bool) lockThread[&chn] = true go func() { runtime.LockOSThread() C.gomsgque_SysServerThreadMain(data, C.MQ_PTR(&chn)) }() return &chn }
func FactoryDefault(ident string, cb FactoryF) *MqFactoryS { v := C.CString(ident) r := C.gomsgque_FactoryDefault(v, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(v)) incrFactoryRef(&cb) if r == nil { panic("MqFactoryS exception") } return (*MqFactoryS)(r) }
func (this *MqDumpS) Delete() { C.MqSysFreeP(C.MQ_PTR(this)) }