bine
bine copied to clipboard
sharing client across multiple goroutines
Is it possible to share the tor client object or the dialer across multiple goroutines?
I end up getting segfaults on the result (but that's probably just me being bad with pointers in the result channel in go)
what's the right way to share it or have multiple requests (say, two at the same time)?
The response of the connection is locked and I don't remember, but you probably cannot use the client in multiple goroutines simultaneously. I suspect if I also locked the request you could, but the safest way is to only use from a single goroutine and make multiple clients if needed.
I'm still getting weird SIGABRT errors if I'm making a new client for each of the goroutines.
is there any way to debug the problem?
looks like I can get a SIGABRT even without using process/embed
I don't work on this library much anymore. I think you'll have to debug why the tor process gives that.