Skip to content

Not thread safe #812

Closed
Closed
@vbraun

Description

@vbraun

I'm getting occasional not reproducable errors (with the same markdown source) when running on Appengine:

Traceback (most recent call last):
[...]
  File "/base/data/home/apps/.../deps/markdown/__init__.py", line 375, in convert
    newRoot = treeprocessor.run(root)
  File "/base/data/home/apps/.../deps/markdown/treeprocessors.py", line 330, in run
    self.ancestors.pop()
IndexError: pop from empty list

I'm having threading enabled (GAE default), and TreeProcessor has a global ancestors stack. So presumably this crashes because simultaneous threads run the markdown processor. I can't find anything in the docs whether python-markdown is supposed to be thread safe, so thats either a documentation request or a bug ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsRelated to the project documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions