Compare commits

...

3 Commits

Author SHA1 Message Date
rulingcom 0a67082f81 Bump version to 0.2.2 2024-03-02 17:28:55 +08:00
rulingcom e39103f3f9 Fix make_finalizer of semaphore. 2024-03-02 17:28:55 +08:00
rulingcom 573fb2d2aa Fix bug. 2024-03-02 17:28:55 +08:00
3 changed files with 8 additions and 6 deletions

View File

@ -1 +1,2 @@
0.2.1
0.2.2

View File

@ -26,9 +26,10 @@ module ProcessShared
#
# Fallback to attempting to load from same directory as this file.
helper = 'process_shared/posix/helper.' + suffix
fallback_path = File.expand_path(File.dirname(__FILE__))
path = $LOAD_PATH.find(fallback_path) do |path|
File.exist?(File.join(path, helper))
gem_spec = Gem::Specification.find_all.find{|g| g.name == 'process_shared'}
path = gem_spec.extensions_dir
unless path.end_with?(gem_spec.full_name)
path = File.join(path, gem_spec.full_name)
end
if defined?(Truffle)

View File

@ -46,8 +46,8 @@ module ProcessShared
# +shm_unlink+ on +sem+.
#
# @return [Proc] a finalizer
def self.make_finalizer(sem)
proc { LibC.shm_unlink(sem) }
def self.make_finalizer(sem) # already called in SharedMemory
Proc.new{}
end
# Create a new semaphore with initial value +value+. After