[speex-dev] Thread Safety
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Thu Oct 30 08:01:21 PST 2003
> Are they actually read-only or are they initialized once? In the latter
> case, you need to protect the initialization section...
No, they're written to every time you enter the lsp_quant_* routines
below. The only reason why this isn't catastrophic is that even wrong
values (two threads writing at the same time) will only produce slightly
sub-optimal results. The fix I proposed was to make the variable local
in each function, since the value is never used after the function
returns.
Jean-Marc
--
Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20031030/501156cf/signature.pgp
More information about the Speex-dev
mailing list