fastthread 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/ext/fastthread/extconf.rb +1 -1
- data/ext/fastthread/fastthread.c +5 -3
- data/fastthread.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/ext/fastthread/extconf.rb
CHANGED
@@ -2,7 +2,7 @@ version_components = RUBY_VERSION.split('.').map { |c| c.to_i }
|
|
2
2
|
|
3
3
|
need_fastthread = ( !defined? RUBY_ENGINE )
|
4
4
|
need_fastthread &= ( RUBY_PLATFORM != 'java' )
|
5
|
-
need_fastthread &=
|
5
|
+
need_fastthread &= version_components[0..1] == [1, 8]
|
6
6
|
|
7
7
|
if need_fastthread
|
8
8
|
require 'mkmf'
|
data/ext/fastthread/fastthread.c
CHANGED
@@ -300,12 +300,14 @@ typedef struct _Mutex {
|
|
300
300
|
List waiting;
|
301
301
|
} Mutex;
|
302
302
|
|
303
|
-
#if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 8 && RUBY_VERSION_TEENY < 6
|
304
|
-
#define
|
303
|
+
#if RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 8 && (RUBY_VERSION_TEENY < 6 || (RUBY_VERSION_TEENY == 6 && RUBY_VERSION_PATCHLEVEL < 31))
|
304
|
+
#define thread_is_alive(t) ((int)1)
|
305
305
|
#else
|
306
|
-
#define
|
306
|
+
#define thread_is_alive(t) RTEST(rb_thread_alive_p((t)))
|
307
307
|
#endif
|
308
308
|
|
309
|
+
#define MUTEX_LOCKED_P(mutex) (RTEST((mutex)->owner) && thread_is_alive((mutex)->owner))
|
310
|
+
|
309
311
|
static void
|
310
312
|
mark_mutex(Mutex *mutex)
|
311
313
|
{
|
data/fastthread.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{fastthread}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.7"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["MenTaLguY <mental@rydia.net>"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-04-08}
|
10
10
|
s.description = %q{Optimized replacement for thread.rb primitives}
|
11
11
|
s.email = %q{mental@rydia.net}
|
12
12
|
s.extensions = ["ext/fastthread/extconf.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastthread
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MenTaLguY <mental@rydia.net>
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-08 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|