eventmachine-eventmachine 0.12.4 → 0.12.5
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/em.cpp +2 -2
- data/ext/em.h +5 -0
- data/ext/extconf.rb +1 -1
- data/lib/eventmachine_version.rb +1 -1
- data/tasks/tests.rake +2 -2
- data/tests/test_epoll.rb +1 -1
- data/tests/test_eventables.rb +3 -4
- metadata +1 -1
data/ext/em.cpp
CHANGED
@@ -674,7 +674,7 @@ SelectData_t::_Select
|
|
674
674
|
int SelectData_t::_Select()
|
675
675
|
{
|
676
676
|
#ifdef HAVE_TBR
|
677
|
-
rb_thread_blocking_region (_SelectDataSelect, (void*)this,
|
677
|
+
rb_thread_blocking_region (_SelectDataSelect, (void*)this, RUBY_UBF_IO, 0);
|
678
678
|
return nSockets;
|
679
679
|
#endif
|
680
680
|
|
@@ -762,7 +762,7 @@ bool EventMachine_t::_RunSelectOnce()
|
|
762
762
|
//timeval tv = Quantum;
|
763
763
|
SelectData.tv = Quantum;
|
764
764
|
int s = SelectData._Select();
|
765
|
-
//rb_thread_blocking_region(xxx,(void*)&SelectData,
|
765
|
+
//rb_thread_blocking_region(xxx,(void*)&SelectData,RUBY_UBF_IO,0);
|
766
766
|
//int s = EmSelect (SelectData.maxsocket+1, &(SelectData.fdreads), &(SelectData.fdwrites), NULL, &(SelectData.tv));
|
767
767
|
//int s = SelectData.nSockets;
|
768
768
|
if (s > 0) {
|
data/ext/em.h
CHANGED
data/ext/extconf.rb
CHANGED
@@ -34,7 +34,7 @@ require 'mkmf'
|
|
34
34
|
|
35
35
|
add_define 'BUILD_FOR_RUBY'
|
36
36
|
add_define 'HAVE_RBTRAP' if have_var('rb_trap_immediate', ['ruby.h', 'rubysig.h'])
|
37
|
-
add_define "HAVE_TBR" if have_func('rb_thread_blocking_region') and have_macro('
|
37
|
+
add_define "HAVE_TBR" if have_func('rb_thread_blocking_region')# and have_macro('RUBY_UBF_IO', 'ruby.h')
|
38
38
|
|
39
39
|
# Minor platform details between *nix and Windows:
|
40
40
|
|
data/lib/eventmachine_version.rb
CHANGED
data/tasks/tests.rake
CHANGED
@@ -26,7 +26,7 @@ desc "Run tests for #{Spec.name}."
|
|
26
26
|
task :test do |t|
|
27
27
|
# run_tests t
|
28
28
|
# Rake +/ friends leave threads, etc, less stable test runs.
|
29
|
-
ruby "-Ilib -Iext -Ijava tests/testem.rb #{'-v' if ENV['VERBOSE']}"
|
29
|
+
ruby "-Ilib -Iext -Iext/fastfilereader -Ijava tests/testem.rb #{'-v' if ENV['VERBOSE']}"
|
30
30
|
end
|
31
31
|
|
32
32
|
namespace :test do
|
@@ -51,7 +51,7 @@ namespace :test do
|
|
51
51
|
"test_pure.rb",
|
52
52
|
"test_running.rb",
|
53
53
|
"test_sasl.rb",
|
54
|
-
|
54
|
+
"test_send_file.rb",
|
55
55
|
"test_servers.rb",
|
56
56
|
"test_smtpclient.rb",
|
57
57
|
"test_smtpserver.rb",
|
data/tests/test_epoll.rb
CHANGED
@@ -61,7 +61,7 @@ class TestEpoll < Test::Unit::TestCase
|
|
61
61
|
# On most systems, the default value is 1024.
|
62
62
|
# Java doesn't (currently) implement this.
|
63
63
|
def test_rlimit
|
64
|
-
unless RUBY_PLATFORM =~ /java/
|
64
|
+
unless RUBY_PLATFORM =~ /java/ or EM.set_descriptor_table_size >= 1024
|
65
65
|
a = EM.set_descriptor_table_size
|
66
66
|
assert( a <= 1024 )
|
67
67
|
a = EM.set_descriptor_table_size( 1024 )
|
data/tests/test_eventables.rb
CHANGED
@@ -27,10 +27,6 @@
|
|
27
27
|
$:.unshift "../lib"
|
28
28
|
require 'eventmachine'
|
29
29
|
|
30
|
-
require 'test/unit/testsuite'
|
31
|
-
require 'test/unit/ui/console/testrunner'
|
32
|
-
|
33
|
-
|
34
30
|
class TestEventables < Test::Unit::TestCase
|
35
31
|
|
36
32
|
class EvTest
|
@@ -68,6 +64,9 @@ end
|
|
68
64
|
#--------------------------------------
|
69
65
|
|
70
66
|
if __FILE__ == $0
|
67
|
+
require 'test/unit/testsuite'
|
68
|
+
require 'test/unit/ui/console/testrunner'
|
69
|
+
|
71
70
|
runner = Test::Unit::UI::Console::TestRunner
|
72
71
|
suite = Test::Unit::TestSuite.new("name")
|
73
72
|
ObjectSpace.each_object(Class) do |testcase|
|