lib/czmq-ffi-gen/czmq/ffi/zsys.rb in czmq-ffi-gen-1.0.0 vs lib/czmq-ffi-gen/czmq/ffi/zsys.rb in czmq-ffi-gen-1.1.0.pre1
- old
+ new
@@ -324,11 +324,11 @@
result
end
# Format a string using printf formatting, returning a freshly allocated
# buffer. If there was insufficient memory, returns NULL. Free the returned
- # string using zstr_free(). The hinted version allows to optimize by using
+ # string using zstr_free(). The hinted version allows one to optimize by using
# a larger starting buffer size (known to/assumed by the developer) and so
# avoid reallocations.
#
# @param hint [Integer, #to_int, #to_i]
# @param format [String, #to_s, nil]
@@ -536,9 +536,30 @@
# Return thread name prefix.
#
# @return [Integer]
def self.thread_name_prefix()
result = ::CZMQ::FFI.zsys_thread_name_prefix()
+ result
+ end
+
+ # Configure the numeric prefix to each thread created for the internal
+ # context's thread pool. This option is only supported on Linux.
+ # If the environment variable ZSYS_THREAD_NAME_PREFIX_STR is defined, that
+ # provides the default.
+ # Note that this method is valid only before any socket is created.
+ #
+ # @param prefix [String, #to_s, nil]
+ # @return [void]
+ def self.set_thread_name_prefix_str(prefix)
+ result = ::CZMQ::FFI.zsys_set_thread_name_prefix_str(prefix)
+ result
+ end
+
+ # Return thread name prefix.
+ #
+ # @return [String]
+ def self.thread_name_prefix_str()
+ result = ::CZMQ::FFI.zsys_thread_name_prefix_str()
result
end
# Adds a specific CPU to the affinity list of the ZMQ context thread pool.
# This option is only supported on Linux.