ruby-fsevent icon indicating copy to clipboard operation
ruby-fsevent copied to clipboard

Stops the Ruby interpreter

Open TwP opened this issue 15 years ago • 4 comments

Using ruby-fsevent on ruby 1.8.7p174

I'm creating an FSEvent notifier class and then calling start inside a thread ....

Thread.new { my_notifier.start }

My notifier is putting the list of changed directories into a queue to be picked up later by another thread. The problem is that the entire ruby interpreter halts; all other threads are suspended.

Not sure why this is happening. Is this the expected behavior?

TwP

TwP avatar Apr 30 '10 22:04 TwP

I wouldn't exactly say it's expected behavior. I actually never tried using this library in a threaded environment. I can confirm that when start the service in a thread, the ruby-interpreter blocks, waiting for the service to stop. Unfortunately, I don't know enough C to know how to fix it. Sorry this is blocking you (pun intended).

sandro avatar Apr 30 '10 23:04 sandro

Hah I get this same issue just in irb when doing require 'fsevent' It will not return from that... :( TwP -- sadly, this means that your fsevent branch of directory_watcher is unusable for me.

sdhull avatar May 17 '10 21:05 sdhull

That is, unless you run directory_watcher under TwP's fork of ruby-fsevent.

sandro avatar May 17 '10 21:05 sandro

Ahhh. I see.

sdhull avatar May 18 '10 04:05 sdhull