Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Stops the Ruby interpreter #1

Open
TwP opened this issue Apr 30, 2010 · 4 comments
Open

Stops the Ruby interpreter #1

TwP opened this issue Apr 30, 2010 · 4 comments

Comments

@TwP
Copy link
Collaborator

TwP commented Apr 30, 2010

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

@sandro
Copy link
Owner

sandro commented Apr 30, 2010

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).

@sdhull
Copy link

sdhull commented May 17, 2010

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.

@sandro
Copy link
Owner

sandro commented May 17, 2010

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

@sdhull
Copy link

sdhull commented May 18, 2010

Ahhh. I see.

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

No branches or pull requests

3 participants