Skip to content

Commit 57524cf

Browse files
authored
Fix mark method overrides on ExecutionContext as :nodoc: (#15659)
The documentation of descendant defs is taken from the parent abstract defs that contain `:nodoc:` and the docs generator doesn't recognizes `:nodoc:` from the copy. This led to internal methods being documented as `:nodoc:`.
1 parent c45bffb commit 57524cf

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/fiber/execution_context/isolated.cr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module Fiber::ExecutionContext
4242
protected getter thread : Thread
4343
@main_fiber : Fiber
4444

45+
# :nodoc:
4546
getter event_loop : Crystal::EventLoop = Crystal::EventLoop.create
4647

4748
getter? running : Bool = true
@@ -96,6 +97,7 @@ module Fiber::ExecutionContext
9697
@spawn_context.spawn(name: name, &block)
9798
end
9899

100+
# :nodoc:
99101
def enqueue(fiber : Fiber) : Nil
100102
Crystal.trace :sched, "enqueue", fiber: fiber, context: self
101103

src/fiber/execution_context/multi_threaded.cr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ module Fiber::ExecutionContext
2121
@condition : Thread::ConditionVariable
2222
protected getter global_queue : GlobalQueue
2323

24+
# :nodoc:
2425
getter stack_pool : Fiber::StackPool = Fiber::StackPool.new
26+
27+
# :nodoc:
2528
getter event_loop : Crystal::EventLoop = Crystal::EventLoop.create
2629
@event_loop_lock = Atomic(Bool).new(false)
2730

@@ -91,6 +94,7 @@ module Fiber::ExecutionContext
9194
@size.end
9295
end
9396

97+
# :nodoc:
9498
def stack_pool? : Fiber::StackPool?
9599
@stack_pool
96100
end
@@ -156,11 +160,13 @@ module Fiber::ExecutionContext
156160
end
157161
end
158162

163+
# :nodoc:
159164
def spawn(*, name : String? = nil, same_thread : Bool, &block : ->) : Fiber
160165
raise ArgumentError.new("#{self.class.name}#spawn doesn't support same_thread:true") if same_thread
161166
self.spawn(name: name, &block)
162167
end
163168

169+
# :nodoc:
164170
def enqueue(fiber : Fiber) : Nil
165171
if ExecutionContext.current == self
166172
# local enqueue: push to local queue of current scheduler

src/fiber/execution_context/single_threaded.cr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ module Fiber::ExecutionContext
2222
@global_queue : GlobalQueue
2323
@runnables : Runnables(256)
2424

25+
# :nodoc:
2526
getter stack_pool : Fiber::StackPool = Fiber::StackPool.new
27+
28+
# :nodoc:
2629
getter event_loop : Crystal::EventLoop = Crystal::EventLoop.create
2730

2831
@waiting = Atomic(Bool).new(false)
@@ -56,6 +59,7 @@ module Fiber::ExecutionContext
5659
self
5760
end
5861

62+
# :nodoc:
5963
def stack_pool? : Fiber::StackPool?
6064
@stack_pool
6165
end
@@ -89,6 +93,7 @@ module Fiber::ExecutionContext
8993
self.spawn(name: name, &block)
9094
end
9195

96+
# :nodoc:
9297
def enqueue(fiber : Fiber) : Nil
9398
if ExecutionContext.current == self
9499
# local enqueue

0 commit comments

Comments
 (0)