Requiring from a thread crashes Ruby #3

Open
jerodsanto opened this Issue Dec 4, 2012 · 0 comments

Projects

None yet

1 participant

@jerodsanto

I'm trying to get this working with Jekyll and everything works great unless the library is invoked from inside a DirectoryWatcher thread (eg - when you do jekyll --auto)

The program aborts when loading in 'peg_multimarkdown.so'. Here is a simple reproduction of the abort:

puts "before"
t = Thread.new do
  require "multimarkdown"
end
t.join
puts "after"

Running this will print "before" followed by "Trace/BPT trap: 5".

My experience with threading and loading shared objects is minimal, so any insights would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment