Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arabica crashes randomly in multi threaded environments #8

Open
stonemaster opened this issue Dec 16, 2013 · 2 comments
Open

Arabica crashes randomly in multi threaded environments #8

stonemaster opened this issue Dec 16, 2013 · 2 comments

Comments

@stonemaster
Copy link

Arabica is not thread safe even when used with objects that aren't shared. The problem lies in the boost Spirit classic Api which can't be used safely in multi threading environments (see https://svn.boost.org/trac/boost/ticket/5520). The problem can be easily reproduced by creating several threads which either compile Xpath expressions or parse XML in distinct objects. It seems that only switching to Boost Spirit V2 solves the problem.

@alexott
Copy link

alexott commented Dec 24, 2013

It's easy to fix by adding BOOST_SPIRIT_THREADSAFE before inclusion of arabica headers (See "Reentrancy and multithreading" at http://www.boost.org/doc/libs/1_35_0/libs/spirit/doc/grammar.html). This will require that Boost.Thread should be linked in addition to other libraries...

P.S. Andre - we can discuss this after I back to work :-)

@jezhiggins
Copy link
Owner

Thanks Alex, and Happy New Year!

I think I can make the necessary changes in the configure script - I'll work up the changes when I get the chance - but it sounds like you can handle it locally until whenever that is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants