Skip to content

Commit

Permalink
Async::IO::CZTopSocket: explicitly only support old non-threadsafe so…
Browse files Browse the repository at this point in the history
…cket types because of zeromq/libzmq#2941
  • Loading branch information
paddor committed Dec 30, 2023
1 parent 32466fe commit b39ea84
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions lib/cztop/async.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@
require 'async/io'

module Async
module IO
class CZTopSocket < Generic
CZTop::Socket::Types.constants.each do |name|
wraps ::CZTop::Socket.const_get(name)
end
module IO
class CZTopSocket < Generic
wraps ::CZTop::Socket::REQ
wraps ::CZTop::Socket::REP
wraps ::CZTop::Socket::PAIR
wraps ::CZTop::Socket::ROUTER
wraps ::CZTop::Socket::DEALER
wraps ::CZTop::Socket::PUSH
wraps ::CZTop::Socket::PULL
wraps ::CZTop::Socket::PUB
wraps ::CZTop::Socket::SUB
wraps ::CZTop::Socket::XPUB
wraps ::CZTop::Socket::XSUB


def receive
Expand Down Expand Up @@ -79,6 +87,6 @@ def write_timeout
def now
Process.clock_gettime(Process::CLOCK_MONOTONIC)
end
end
end
end
end

0 comments on commit b39ea84

Please sign in to comment.