Changeset 499
- Timestamp:
- 08/13/07 13:08:22 (1 year ago)
- Files:
-
- version_0/ChangeLog (modified) (1 diff)
- version_0/lib/eventmachine.rb (modified) (3 diffs)
- version_0/Rakefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
version_0/ChangeLog
r497 r499 55 55 29Jul07: Added EventMachine::Protocols::Stomp. 56 56 30Jul07: Added sys/stat.h to project.h to fix compilation bug on Darwin. 57 13Aug07: Added EventMachine#reactor_running? 58 version_0/lib/eventmachine.rb
r496 r499 217 217 @timers = {} 218 218 begin 219 @reactor_running = true 219 220 initialize_event_machine 220 221 block and add_timer 0, block … … 222 223 ensure 223 224 release_machine 225 @reactor_running = false 224 226 end 225 227 end … … 944 946 end 945 947 948 949 # Tells you whether the EventMachine reactor loop is currently running. Returns true or 950 # false. Useful when writing libraries that want to run event-driven code, but may 951 # be running in programs that are already event-driven. In such cases, if EventMachine#reactor_running? 952 # returns false, your code can invoke EventMachine#run and run your application code inside 953 # the block passed to that method. If EventMachine#reactor_running? returns true, just 954 # execute your event-aware code. 955 # 956 # This method is necessary because calling EventMachine#run inside of another call to 957 # EventMachine#run generates a fatal error. 958 # 959 def self::reactor_running? 960 (@reactor_running || false) 961 end 946 962 947 963 version_0/Rakefile
r492 r499 338 338 end 339 339 340 desc "Test Running" 341 task :test_running do |t| 342 run_tests t, :extension, "test_running*.rb" 343 end 344 340 345 341 346 desc "Build everything"