Tom Sawyer wrote:
i’m guessing my API’s
not thread-safe, but i’m not sure what factors make something
thread-safe or not really. does my use of class variables do that?
Access to mutator methods (methods that change state) on a object from
several threads of execution will make your code non-thread-safe. Class
variables tend to be available to all instances of the class, and if you
then have instances of the class in various threads, you are very likely
to run into threading issues.
You’ll probably need to guard the access to the class variables. Take a
look at the Mutex class. The PickAxe chapter should tell you most of
what you need to know. (
([ Kent Dahl ]/)_ ~ [ http://www.stud.ntnu.no/~kentda/ ]/~
))_student/(( _d L b_/ NTNU - graduate engineering - 4. year )
( __õ|õ// ) )Industrial economics and technological management(