zookeeper 1.4.9 → 1.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +2 -0
- data/Gemfile +1 -1
- data/ext/extconf.rb +3 -2
- data/ext/zkrb.c +25 -11
- data/lib/zookeeper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2ExZTdhNmM5YTg4NDNhM2M4ZmYyNTljMzYxMTk1MWZhODBkNzc2Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTg0ZjdhODRhMzkxMGFlOWYwNDZmYTcwMmVhYzdjZTg2OTNmYjQ2Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTQ2OGJjNmU5MTQ1MTgwMWM5ODIyMTRjZGYwOWQxYzIxMTIzZDJjYTM5ZWI4
|
10
|
+
MzU2YTkzY2YzNWE0NTA3NDU2MWE5Nzg0OTY4NDVlYzY1NjIxODJmMzNhMjE2
|
11
|
+
MDMzNmY5MzEwYmJkMDM5NTQzMzQyZGVjOTVjOWYzZGFiYTdkMTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzIwMGViM2Y4ZWYyNzYzOWFmNjNjNTIyZGM1ODJhOWI2Mzk4MGFjYWE0OTg1
|
14
|
+
ZjhjYWVkZWIxMjFlYmIyOWIzMzYwZDFlZTljNzAwM2FhOTkwNWU0MGExYTYw
|
15
|
+
ZmE2OTA3MzRlNjgzYzA2Y2I0MDViZDRjMDMyYzU2ZjIxNDYyMWE=
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/ext/extconf.rb
CHANGED
@@ -68,7 +68,7 @@ Dir.chdir(HERE) do
|
|
68
68
|
# clean up stupid apple rsrc fork bullshit
|
69
69
|
FileUtils.rm_f(Dir['**/._*'].select{|p| test(?f, p)})
|
70
70
|
|
71
|
-
Dir.chdir(BUNDLE_PATH) do
|
71
|
+
Dir.chdir(BUNDLE_PATH) do
|
72
72
|
configure = "./configure --prefix=#{HERE} --with-pic --without-cppunit --disable-dependency-tracking #{$EXTRA_CONF} 2>&1"
|
73
73
|
configure = "env CFLAGS='#{DEBUG_CFLAGS}' #{configure}" if ZK_DEBUG
|
74
74
|
|
@@ -85,13 +85,14 @@ end
|
|
85
85
|
Dir.chdir("#{HERE}/lib") do
|
86
86
|
%w[st mt].each do |stmt|
|
87
87
|
%w[a la].each do |ext|
|
88
|
-
system("cp -f libzookeeper_#{stmt}.#{ext} libzookeeper_#{stmt}_gem.#{ext}")
|
88
|
+
system("cp -f libzookeeper_#{stmt}.#{ext} libzookeeper_#{stmt}_gem.#{ext}")
|
89
89
|
end
|
90
90
|
end
|
91
91
|
end
|
92
92
|
$LIBS << " -lzookeeper_st_gem"
|
93
93
|
|
94
94
|
have_func('rb_thread_blocking_region')
|
95
|
+
have_func('rb_thread_fd_select')
|
95
96
|
|
96
97
|
$CFLAGS << ' -Wall' if ZK_DEV
|
97
98
|
create_makefile 'zookeeper_c'
|
data/ext/zkrb.c
CHANGED
@@ -73,6 +73,17 @@
|
|
73
73
|
#include "ruby/io.h"
|
74
74
|
#endif
|
75
75
|
|
76
|
+
#ifndef HAVE_RB_THREAD_FD_SELECT
|
77
|
+
#define rb_fdset_t fd_set
|
78
|
+
#define rb_fd_isset(n, f) FD_ISSET(n, f)
|
79
|
+
#define rb_fd_init(f) FD_ZERO(f)
|
80
|
+
#define rb_fd_zero(f) FD_ZERO(f)
|
81
|
+
#define rb_fd_set(n, f) FD_SET(n, f)
|
82
|
+
#define rb_fd_clr(n, f) FD_CLR(n, f)
|
83
|
+
#define rb_fd_term(f)
|
84
|
+
#define rb_thread_fd_select rb_thread_select
|
85
|
+
#endif
|
86
|
+
|
76
87
|
#include "zookeeper/zookeeper.h"
|
77
88
|
#include <errno.h>
|
78
89
|
#include <stdio.h>
|
@@ -787,8 +798,8 @@ inline static int get_self_pipe_read_fd(VALUE self) {
|
|
787
798
|
static VALUE method_zkrb_iterate_event_loop(VALUE self) {
|
788
799
|
FETCH_DATA_PTR(self, zk);
|
789
800
|
|
790
|
-
|
791
|
-
|
801
|
+
rb_fdset_t rfds, wfds, efds;
|
802
|
+
rb_fd_init(&rfds); rb_fd_init(&wfds); rb_fd_init(&efds);
|
792
803
|
|
793
804
|
int fd = 0, interest = 0, events = 0, rc = 0, maxfd = 0, irc = 0, prc = 0;
|
794
805
|
struct timeval tv;
|
@@ -797,14 +808,14 @@ static VALUE method_zkrb_iterate_event_loop(VALUE self) {
|
|
797
808
|
|
798
809
|
if (fd != -1) {
|
799
810
|
if (interest & ZOOKEEPER_READ) {
|
800
|
-
|
811
|
+
rb_fd_set(fd, &rfds);
|
801
812
|
} else {
|
802
|
-
|
813
|
+
rb_fd_clr(fd, &rfds);
|
803
814
|
}
|
804
815
|
if (interest & ZOOKEEPER_WRITE) {
|
805
|
-
|
816
|
+
rb_fd_set(fd, &wfds);
|
806
817
|
} else {
|
807
|
-
|
818
|
+
rb_fd_clr(fd, &wfds);
|
808
819
|
}
|
809
820
|
} else {
|
810
821
|
fd = 0;
|
@@ -813,22 +824,22 @@ static VALUE method_zkrb_iterate_event_loop(VALUE self) {
|
|
813
824
|
// add our self-pipe to the read set, allow us to wake up in case our attention is needed
|
814
825
|
int pipe_r_fd = get_self_pipe_read_fd(self);
|
815
826
|
|
816
|
-
|
827
|
+
rb_fd_set(pipe_r_fd, &rfds);
|
817
828
|
|
818
829
|
maxfd = (pipe_r_fd > fd) ? pipe_r_fd : fd;
|
819
830
|
|
820
|
-
rc =
|
831
|
+
rc = rb_thread_fd_select(maxfd+1, &rfds, &wfds, &efds, &tv);
|
821
832
|
|
822
833
|
if (rc > 0) {
|
823
|
-
if (
|
834
|
+
if (rb_fd_isset(fd, &rfds)) {
|
824
835
|
events |= ZOOKEEPER_READ;
|
825
836
|
}
|
826
|
-
if (
|
837
|
+
if (rb_fd_isset(fd, &wfds)) {
|
827
838
|
events |= ZOOKEEPER_WRITE;
|
828
839
|
}
|
829
840
|
|
830
841
|
// we got woken up by the self-pipe
|
831
|
-
if (
|
842
|
+
if (rb_fd_isset(pipe_r_fd, &rfds)) {
|
832
843
|
// one event has awoken us, so we clear one event from the pipe
|
833
844
|
char b[1];
|
834
845
|
|
@@ -853,6 +864,9 @@ static VALUE method_zkrb_iterate_event_loop(VALUE self) {
|
|
853
864
|
prc, interest, fd, pipe_r_fd, maxfd, irc, tv.tv_sec + (tv.tv_usec/ 1000.0 / 1000.0));
|
854
865
|
}
|
855
866
|
|
867
|
+
rb_fd_term(&rfds);
|
868
|
+
rb_fd_term(&wfds);
|
869
|
+
rb_fd_term(&efds);
|
856
870
|
return INT2FIX(prc);
|
857
871
|
}
|
858
872
|
|
data/lib/zookeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zookeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phillip Pearson
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2015-01-12 00:00:00.000000000 Z
|
17
17
|
dependencies: []
|
18
18
|
description: ! 'A low-level multi-Ruby wrapper around the ZooKeeper API bindings.
|
19
19
|
For a
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.4.5
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Apache ZooKeeper driver for Rubies
|