[Nice] thread/smp safety of libnice code

Youness Alaoui youness.alaoui at collabora.co.uk
Thu Sep 10 10:50:29 PDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, libnice is perfectly thread-safe with regards to the libnice (ICE
Agent) API... however, the STUN API (stun_agent_*/stun_message_*/..) is
not thread safe, so if you want to use use the STUN api itself directly,
make sure to protect it yourself, if you're just using the ICE API, you
don't need to do anything...

Youness.

Olivier Crête wrote:
> On Thu, 2009-09-10 at 13:21 +0200, purushottam.naik at nokia.com wrote:
>> I have one quick question. Are all libnice apis are thread/smp safe? If not, have you identified the hot spots or the apis that may need to be taken care for thread safety?
> 
> It should be thread safe. There is a BIG lock taken around all
> invocations of the libnie code (see agent_lock()/agent_unlock()). In the
> Farsight2 case, there is a one thread for times and one per stream for
> sending and one per stream for receiving.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Nice mailing list
> Nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqpPGQACgkQqvxLNLvrsxxQGwCfXeDI+7VvsKcR66SDwXwDoZ9O
J+UAn3e35yjpIkfOUkEAO8TfgGzkob9e
=i4fb
-----END PGP SIGNATURE-----


More information about the Nice mailing list