-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi all,
Is it possible to have a callback method which is of any specific type?
example:
type nfqCallback struct {
pool *redis.Pool
}
func(n nfqCallback) real_callback(payload *nfqueue.Payload) int {
// access the pool here
}
// some where in main
w := nfqCallback{pool: p}
queue.SetCallback(w.real_callback)
I tried to run the code but it panic'ed with the following trace.
panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 10 [running]:
panic(0x995e40, 0xc42120ecc0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
bitbucket.org/acklio/vdm/vendor/github.com/chifflier/nfqueue-go/nfqueue._cgoCheckPointer0(0xc4212122a0, 0x0, 0x0, 0x0, 0x0)
??:0 +0x59
bitbucket.org/acklio/vdm/vendor/github.com/chifflier/nfqueue-go/nfqueue.(*Queue).CreateQueue(0xc4212122a0, 0x0, 0x0, 0x0)
/home/arun/work/src/bitbucket.org/acklio/vdm/vendor/github.com/chifflier/nfqueue-go/nfqueue/nfqueue.go:165 +0x155
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels