[Unbound-users] Using libunbound from other languages

Miek Gieben miek at miek.nl
Tue Jul 23 08:02:48 UTC 2013


[ Quoting <unbound-users+phil at spodhu> in "Re: [Unbound-users] Using libunboun..." ]
> > Hmmmm, that would certainly help (and maybe hurt performance), but then I still
> > don't have the proper thread locking in place....
> 
> You don't need it.  You create a go-routine which uses channels for

If you say, 'You don't need it", of what locking and where do you talk about?
The Go code can be relative lock free, but why can I get away with not telling
OpenSSL (or NSS) that it is going to get called from threaded code?

>       runtime.LockOSThread()
>       defer runtime.UnlockOSThread()
>       // do Unbound setup

This would be the point to "tell OpenSSL/NSS that it is going to get called from
threaded code", No?

> Synchronous with N OS threads (no Go switch) and C.ub_resolve() should
> get things going, since the callbacks for async will basically need to
> be handled carefully, since if memory serves Go doesn't expose channel
> write to the C layer.  Or am I wrong?

You may be right, but I think you are talking about stuff one layer higher than
I am.

- Grtz,

 ---
   Miek Gieben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20130723/9f36012e/attachment.bin>


More information about the Unbound-users mailing list