| CODENOTIFIER | HelpYou are not signed inSign in |
Project: rev
Revision: 239
Author: tarcieri
Date: 29 Jul 2008 01:31:44
Changes:Fix Rev::Loop#watchers for new hash-based implementation
Files:| ... | ...@@ -15,8 +15,6 @@ | |
| 15 | 15 | |
| 16 | 16 | module Rev |
| 17 | 17 | class Loop |
| 18 | attr_reader :watchers | |
| 19 | ||
| 20 | 18 | # In Ruby 1.9 we want a Rev::Loop per thread, but Ruby 1.8 is unithreaded |
| 21 | 19 | if RUBY_VERSION >= "1.9.0" |
| 22 | 20 | # Retrieve the default event loop for the current thread |
| ... | ...@@ -111,6 +109,11 @@ | |
| 111 | 109 | @active_watchers > 0 |
| 112 | 110 | end |
| 113 | 111 | |
| 112 | # All watchers attached to the current loop | |
| 113 | def watchers | |
| 114 | @watchers.keys | |
| 115 | end | |
| 116 | ||
| 114 | 117 | ####### |
| 115 | 118 | private |
| 116 | 119 | ####### |