We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96e8a75 commit ea40ab1Copy full SHA for ea40ab1
examples/bench_atomic.rb
100644
100755
@@ -1,8 +1,18 @@
1
+#!/usr/bin/env ruby
2
+
3
+$: << File.expand_path('../../lib', __FILE__)
4
5
require 'benchmark'
6
require 'rbconfig'
7
require 'thread'
8
9
require 'concurrent/atomic'
10
11
+unless defined? Concurrent::CAtomic
12
+ warn "[ERROR] C extensions not loaded!"
13
+ exit(1)
14
+end
15
16
Thread.abort_on_exception = true
17
18
$go = false # for synchronizing parallel threads
examples/bench_atomic_1.rb
@@ -6,10 +6,11 @@
-begin
- require 'concurrent-ext'
-rescue LoadError
- require 'concurrent'
+require 'concurrent/atomic'
end
0 commit comments