Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/concurrent/edge/processing_actor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def ask(message, answer = Promises.resolvable_future)

# @return [String] string representation.
def inspect
format '<#%s:0x%x termination:%s>', self.class, object_id << 1, termination.state
format '%s termination:%s>', super[0..-2], termination.state
end

private
Expand Down
6 changes: 1 addition & 5 deletions lib/concurrent/map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,8 @@ def marshal_load(hash)
undef :freeze

# @!visibility private
DEFAULT_OBJ_ID_STR_WIDTH = 0.size == 4 ? 7 : 14 # we want to look "native", 7 for 32-bit, 14 for 64-bit
# override default #inspect() method: firstly, we don't want to be spilling our guts (i-vars), secondly, MRI backend's
# #inspect() call on its @backend i-var will bump @backend's iter level while possibly yielding GVL
def inspect
id_str = (object_id << 1).to_s(16).rjust(DEFAULT_OBJ_ID_STR_WIDTH, '0')
"#<#{self.class.name}:0x#{id_str} entries=#{size} default_proc=#{@default_proc.inspect}>"
format '%s entries=%d default_proc=%s>', to_s[0..-2], size.to_s, @default_proc.inspect
end

private
Expand Down