[ Quoting <unbound-users+phil@spodhu> in "Re: [Unbound-users] Using 
libunboun..." ]
> > OpenSSL (or NSS) that it is going to get called from threaded code?
> you do setup multiple threads which can enter libunbound, you'd need to
> init the SSL library appropriately.  Do you need to do this?  If only
> one thread of DNS resolution is sufficient, then my point stands.

That's my point, I also think I need this. I don't really have (or want)
control over the thread creation in my Go -> unbound code. (Stuff is
already working see github.com/miekg/unbound)

> You could have one thread today, and a simple cgo-exported "is this
> library new enough to let me init crypto for multiple threads" predicate
> which you can use to decide whether or not to permit spawning more than
> one lookup thread.

Yeah, making that work transparant for older versions is a challenge. See
the current hack for a new member that was added in unbound 1.4.19:
https://github.com/miekg/unbound/blob/master/unbound.go#L47

> Looking more closely, and thinking, I realise you might be working on a
> generic unbound wrapper for Go, so you're not asserting the app won't
> use OpenSSL, only that your own library is not doing so?  In which case,
> I misinterpreted the impact of your second bullet point, sorry.

I'm sorry I didn't make that (as I have running code) clear enough, but
multiple unbound.New()'s should be possible and I would even say
encouraged .

> And in which case, I see the problem.

Hmmpff :)

- Grtz,

 ---
   Miek Gieben

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Unbound-users mailing list
[email protected]
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users

Reply via email to