Skip to content

Commit

Permalink
Wait on change pool instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudgg committed Nov 29, 2013
1 parent 6bb385d commit ca363ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/listen/adapter/base.rb
Expand Up @@ -32,6 +32,7 @@ def _directories_path
end

def _notify_change(path, options)
sleep 0.01 until listener.registry[:change_pool]
listener.registry[:change_pool].async.change(path, options) if listener.listen?
end
end
Expand Down
3 changes: 1 addition & 2 deletions lib/listen/listener.rb
Expand Up @@ -129,9 +129,8 @@ def _init_actors
supervisor.add(Silencer, as: :silencer, args: self)
supervisor.add(Record, as: :record, args: self)
supervisor.pool(Change, as: :change_pool, args: self)

adapter_class = Adapter.select(options)
p adapter_class
p registry[:change_pool]
supervisor.add(adapter_class, as: :adapter, args: self)
end

Expand Down

0 comments on commit ca363ae

Please sign in to comment.