Skip to content

Commit

Permalink
Crystal 0.34 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
didactic-drunk committed Apr 23, 2020
1 parent 693b45f commit a33385b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version: 0.1.0
authors:
- Didactic Drunk <[email protected]>

crystal: 0.30.0
crystal: 0.34.0

license: MIT
7 changes: 6 additions & 1 deletion spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "spec"
require "semantic_version"

STDOUT.sync = true
STDERR.sync = true
Expand All @@ -12,7 +13,11 @@ class WatchDog
end

def kill
@fork_proc.try &.kill(Signal::KILL)
{% if Process.has_method?(:signal) %}
@fork_proc.try &.signal(Signal::KILL)
{% else %}
@fork_proc.try &.kill(Signal::KILL)
{% end %}
end

def self.open(timeout)
Expand Down
2 changes: 2 additions & 0 deletions src/concurrent/count_down_latch.cr
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class Concurrent::CountDownLatch
raise_ex Error::CountExceeded.new("#{Fiber.current} counted past 0 wait_count=#{wait_count} saved_wait_count=#{@saved_wait_count}")
when 1
release
else
# Exhaustive case
end
end

Expand Down

0 comments on commit a33385b

Please sign in to comment.