Skip to content

Commit e3c1b09

Browse files
committed
Remove threading
1 parent 1c927e8 commit e3c1b09

11 files changed

+7
-865
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ mruby bindings for https://github.com/zeromq/libzmq (v4)
44
Everything libzmq offers is mapped 1:1 to the LibZMQ namespace, no beautification was done.
55
High level ruby functions are inside the ZMQ Namespace, you can find most of it inside the mrblib folder, except some of the Msg and Socket classes functions which have to be done in c.
66

7-
As a bonus a Threading abstraction can be found in the ZMQ::Thread and ZMQ::Thread_fn Namespaces.
8-
97
Installation
108
============
119

build_config.rb.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
mruby:
33
version: 3.3.0
44
release_no: 30300
5-
git_commit: a810b9bca8cd7f99a766431ca39e24c083a1fc0e
5+
git_commit: 0023cbdb3dfda2fb51c12be91ecd72df1fbd7fc7
66
builds:
77
host:
88
https://github.com/Asmod4n/mruby-proc-irep-ext.git:

mrbgem.rake

+3-16
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ MRuby::Gem::Specification.new('mruby-zmq') do |spec|
44
spec.summary = 'mruby bindings for libzmq4'
55
spec.add_conflict 'mruby-czmq'
66
spec.add_dependency 'mruby-errno'
7-
spec.add_dependency 'mruby-proc-irep-ext'
8-
spec.add_dependency 'mruby-simplemsgpack'
97
spec.add_dependency 'mruby-objectspace'
108
spec.add_dependency 'mruby-pack'
119
spec.add_dependency 'mruby-env'
@@ -19,7 +17,7 @@ MRuby::Gem::Specification.new('mruby-zmq') do |spec|
1917
def build_libzmq(spec, build)
2018
unless File.exists?("#{spec.build_dir}/build/lib/libzmq.a")
2119
warn "mruby-zmq: cannot find libzmq, building it"
22-
sh "mkdir -p #{spec.build_dir}/build && cd #{spec.build_dir}/build && cmake -DCMAKE_INSTALL_PREFIX=\"#{spec.build_dir}\" -DWITH_LIBSODIUM=OFF -DENABLE_CURVE=ON -DENABLE_DRAFTS=ON #{spec.dir}/deps/libzmq/ && cmake --build . -j$(nproc) --target libzmq-static && make -j$(nproc) install"
20+
sh "mkdir -p #{spec.build_dir}/build && cd #{spec.build_dir}/build && cmake -DCMAKE_INSTALL_PREFIX=\"#{spec.build_dir}\" -DWITH_LIBSODIUM=ON -DENABLE_CURVE=ON -DENABLE_DRAFTS=ON #{spec.dir}/deps/libzmq/ && cmake --build . -j$(nproc) --target libzmq-static && make -j$(nproc) install"
2321
end
2422
spec.linker.flags_before_libraries << "\"#{spec.build_dir}/build/lib/libzmq.a\""
2523
`pkg-config --cflags \"#{spec.build_dir}/build/libzmq.pc\"`.split("\s").each do |cflag|
@@ -32,9 +30,6 @@ MRuby::Gem::Specification.new('mruby-zmq') do |spec|
3230
end
3331
end
3432

35-
if spec.cc.search_header_path 'threads.h'
36-
spec.cc.defines << 'HAVE_THREADS_H'
37-
end
3833
if spec.cc.search_header_path 'ifaddrs.h'
3934
spec.cc.defines << 'HAVE_IFADDRS_H'
4035
end
@@ -44,18 +39,10 @@ MRuby::Gem::Specification.new('mruby-zmq') do |spec|
4439
if ENV['BUILD_LIBZMQ']
4540
build_libzmq(spec, build)
4641
else
47-
`pkg-config --cflags libzmq 2>/dev/null`.split("\s").each do |cflag|
48-
spec.cxx.flags << cflag
49-
spec.cc.flags << cflag
50-
end
51-
exitstatus = $?.exitstatus
52-
`pkg-config --libs libzmq 2>/dev/null`.split("\s").each do |lib|
53-
spec.linker.flags_before_libraries << lib
54-
end
55-
exitstatus += $?.exitstatus
56-
unless exitstatus == 0
42+
unless spec.search_package('libzmq')
5743
build_libzmq(spec, build)
5844
end
45+
5946
end
6047
spec.linker.flags_before_libraries << '-pthread'
6148
end

mrblib/proxy.rb

-52
This file was deleted.

mrblib/thread.rb

-183
This file was deleted.

src/c11threads.h

-34
This file was deleted.

src/c11threads_posix.h

-31
This file was deleted.

0 commit comments

Comments
 (0)