Skip to content

Commit af335ee

Browse files
committed
Surpress excessive warning in Scheduler#async. Fixes #410.
1 parent e6d6f94 commit af335ee

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/async/scheduler.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ def run(...)
583583
# @yields {|task| ...} Executed within the task.
584584
# @returns [Task] The task that was scheduled into the reactor.
585585
def async(*arguments, **options, &block)
586-
warn("Async::Scheduler#async is deprecated. Use `run` or `Task#async` instead.", uplevel: 1, category: :deprecated) if $VERBOSE
586+
# Since this method is called by `run`, this warning is too excessive:
587+
# warn("Async::Scheduler#async is deprecated. Use `run` or `Task#async` instead.", uplevel: 1, category: :deprecated) if $VERBOSE
587588

588589
Kernel.raise ClosedError if @selector.nil?
589590

releases.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Suppress excessive warning in `Async::Scheduler#async`.
6+
37
## v2.27.3
48

59
- Ensure trace attributes are strings, fixes integration with OpenTelemetry.

0 commit comments

Comments
 (0)