zscheduler 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ module Zscheduler
10
10
  reactor_running? or start_reactor
11
11
 
12
12
  add_shutdown_hook block if options[:on_shutdown]
13
+ block.call if options[:immediately]
13
14
 
14
15
  timers.push EM::PeriodicTimer.new(Integer frequency) do
15
16
  options[:on_thread] ? Thread.new(&block) : block.call
@@ -18,10 +19,6 @@ module Zscheduler
18
19
  timers.last
19
20
  end
20
21
 
21
- def now_and_every(*args,&block)
22
- block.call & every(*args,&block)
23
- end
24
-
25
22
  def stop
26
23
  timers.each(&:cancel)
27
24
  shutdown_hooks.each(&:call)
@@ -35,7 +32,7 @@ module Zscheduler
35
32
  end
36
33
 
37
34
  def join
38
- EM.reactor_thread.join
35
+ (wrapper or EM.reactor_thread).join
39
36
  end
40
37
 
41
38
  private
@@ -1,3 +1,3 @@
1
1
  module Zscheduler
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zscheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-08 00:00:00.000000000 Z
12
+ date: 2013-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine