Project

General

Profile

Actions

Feature #19056

closed

Introduce `Fiber.annotation` for attaching messages to fibers.

Added by ioquatix (Samuel Williams) over 1 year ago. Updated 21 days ago.

Status:
Closed
Target version:
-
[ruby-core:110293]

Description

It's useful to know what a fiber is doing especially when they have a temporal execution (i.e. sockets connecting vs connected, binding vs accepting, queue popping, etc)

Let's introduce Fiber.annotate and Fiber#annotation for logging a short message attached to Fibers.

Fiber.annotate "Counting to 10"
10.times{|I| puts I}

# Fiber.current.annotation => "Counting to 10"

Pull Request: https://github.com/ruby/ruby/pull/6554


Files

clipboard-202210160132-n7lzp.png (865 KB) clipboard-202210160132-n7lzp.png ioquatix (Samuel Williams), 10/15/2022 12:32 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0