Boost logo

Boost Users :

From: Sigurd Saue (ssaue_at_[hidden])
Date: 2006-06-29 10:49:31


We use boost serialization for sending notifications from a server to
multiple clients. The problematic scenario is when two client threads within
the same process deserializes the same notification. In your words: the same
archive into different object from different threads.

Sigurd Saue

-----Opprinnelig melding-----
Fra: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]]Pa vegne av Robert Ramey
Sendt: 29. juni 2006 16:41
Til: boost-users_at_[hidden]
Emne: Re: [Boost-users] Is serialization thread safe?

Sigurd Saue wrote:
> We are using boost serialization in our multithreaded application and
> have encountered some problems when multiple threads deserialize the
> same kind of object at the same time.

The same object? - would this be different archives into different objects
or the same archive into different objects from different threads.

It's not clear what is being done here.

> The problems went away when we
> added a global lock prior to the deserialization statement. There
> might be other issues involved so to clarify the situtation: Is boost
> serialization supposed to be thread safe?
>
> Sigurd

The "serial" nature of the process excludes a number of mult-thread
scenarios by definition.I believe that serialization is thread safe in all
contexts where it makes sense to access serialization from different
threads.

Robert Ramey.

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net