GithubHelp home page GithubHelp logo

Comments (4)

sirthias avatar sirthias commented on July 24, 2024

Interesting... I currently can't see any reason why your ThreadLocal construct wouldn't work.
Are you sure you are not caching the instance you get from MarkDownProcessor.get() and somehow access it concurrently from multiple threads?

from pegdown.

martinschayna avatar martinschayna commented on July 24, 2024

I'm posting some findings.

  • I don't cache instances of PegDownProcessor
  • it seems that this bug(?) depends on current machine speed, with faster CPU it is more frequent, for example on my dev machine it is very rarely but on production much powerfull server allways
  • it only occurred on first line of markdown source

This is real example:

##Description##
Not available yet.
##Properties##
Not available yet.  

HTML looks like this:

<p>##Description##<br>Not available yet. </p><h2>Properties</h2><p>Not available yet. </p>

but should be (and after page refresh it is):

<h2>Description</h2><p>Not available yet. </p><h2>Properties</h2><p>Not available yet. </p>

from pegdown.

sirthias avatar sirthias commented on July 24, 2024

Martin,
thanks a lot for your deeper analysis.
From the looks of it it really should be a race condition, either in pegdown itself or in the underlying parboiled parser implementation.
I now should have enough to be able to nail this thing down and get it fixed.

Thanks for the report!

from pegdown.

sirthias avatar sirthias commented on July 24, 2024

Unfortunately I cannot reproduce the issue.
Please distill a small test case that I could use for reproducing...
Closing for the time being.

from pegdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.