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 CHANGED
@@ -1,3 +1,5 @@
1
+ v1.0.7 Enable for all 1.8.x versions; add fix for 1.8.6 patchlevels < 31
2
+
1
3
  v1.0.6 Try again for 1.8.5.
2
4
 
3
5
  v1.0.5 Backwards compatibility tweak for 1.8.5
@@ -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 &= ( version_components[0..1] == [1, 8] && ( version_components[2] < 6 || version_components[2] == 6 && RUBY_PATCHLEVEL.to_i < 112 ) )
5
+ need_fastthread &= version_components[0..1] == [1, 8]
6
6
 
7
7
  if need_fastthread
8
8
  require 'mkmf'
@@ -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 MUTEX_LOCKED_P(mutex) (RTEST((mutex)->owner))
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 MUTEX_LOCKED_P(mutex) (RTEST((mutex)->owner) && rb_thread_alive_p((mutex)->owner))
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
  {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{fastthread}
5
- s.version = "1.0.6"
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-03-29}
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.6
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-03-29 00:00:00 -04:00
12
+ date: 2009-04-08 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15