Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,35 @@
# frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2018-2024, by Samuel Williams.
require_relative "condition"
module Async
# A synchronization primitive, which allows fibers to wait until a notification is received. Does not block the task which signals the notification. Waiting tasks are resumed on next iteration of the reactor.
# @public Since *Async v1*.
class Notification < Condition
# Signal to a given task that it should resume operations.
def signal(value = nil, task: Task.current)
return if @waiting.empty?
Fiber.scheduler.push Signal.new(self.exchange, value)
return nil
end
Signal = Struct.new(:waiting, :value) do
def alive?
true
end
def transfer
waiting.each do |fiber|
fiber.transfer(value) if fiber.alive?
end
end
end
private_constant :Signal
end
end