Is Poco Capsule thread safe?

38 views
Skip to first unread message

sam.be...@gmail.com

unread,
Feb 12, 2009, 10:47:28 AM2/12/09
to pococapsule, sam_be...@yahoo.com
I am considering using Poco Capsule in C++ project which is multi
threaded.
Is the container thread safe?

Regards,
-Sam.

Ke Jin

unread,
Feb 13, 2009, 1:35:20 AM2/13/09
to pococapsule
Hi Sam,

Is PocoCapsule thread safe? No!
Is PocoCapsule able to be easily and safely used in multi-threaded
application? Yes!

Most of PocoCapsule functions are reentrant (if this pointers are also
countered as input). The only singleton used in the core engine is the
default environment which can be overridden by user specified
environment. Accessing to context, environment, etc. objects are not
mutexed. Namely, if multiple threads concurrently access such an
object, users need to protect it as a critical section. This is common
design practice in all similar frameworks, such as STL and boost. The
idea is to make the core engine self-contain (without depending on
external non-standard libraries), easy to port, and also reduce
unnecessary footprint.

By the way, why you need to access PocoCapsule context object
concurrently from multiple threads?

Thanks!
Ke
Reply all
Reply to author
Forward
0 new messages