Hi,
Steinar Midtskogen:
> * When it's time to write to the log file, the parent will cancel
> all the threads, process all data from every thread (average, max,
> min, whatever to be logged etc) and log to file.
>
Hmm. Thread canceling might cause problems
(memory leaks? Non-released locks?).
Why not just add a lock around accesses to the relevant data structures?
Anyway, I wonder about the thread-safe-ness of this code in OW_get():
if (ret >= 0) {
*buffer = OWQ_buffer(&owq);
if (buffer_length != NULL) {
*buffer_length = OWQ_size(&owq);
}
}
FS_OWQ_destroy(&owq);
My naïve reading of this code says that the buffer is either part of
the owq struct, in which case it'll be gone after FS_OWQ_destroy() is
called -- or not, which presumably will cause it to be overwritten by
another thread.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [email protected]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
v4sw7$Yhw6+8ln7ma7u7L!wl7DUi2e6t3TMWb8HAGen6g3a4s6Mr1p-3/-6 hackerkey.com
- -
BOFH excuse #212:
Of course it doesn't work. We've performed a software upgrade.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers