D
dandelion
Eltee said:So you guys always use synchronized wrappers around stdlib functions? I mean, common
"operations" such as malloc, sprintf?
Nope. I try to avoid calling them alltogether in any part of the system that
is eligable to have multiple threads of execution running.
multi-threadedness is concerned?That's news to me, cause I haven't written a synchronized wrapper around a malloc, yet.
Consequently, my entire "c opus" ;-) is useless as far as
Bummer!
Hmmm... Without knowing your "Magnus Opus", not all is lost.
Writing wrappers for the functions you need isn't all that hard and usually
a multithreaded app has one main thread taking care of all the mallocing,
sprintffing etc. and a number of "small" threads with a very limited task .
That makes it easy to avoid calling the standard lib in the "small" threads
and thus, reentrancy is not really a problem.