GithubHelp home page GithubHelp logo

fiber-local's Introduction

Fiber::Local

A module to simplify fiber-local state. This provides a convenient interface for providing a default per-thread instance, while allowing per-fiber overrides (e.g. per-request state handling).

Development Status

Usage

Please see the project documentation for more details.

  • Getting Started - This guide will explain how and why to use Fiber::Local to simplify fiber-local state.

Contributing

We welcome contributions to this project.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.

Developer Certificate of Origin

This project uses the Developer Certificate of Origin. All contributors to this project must agree to this document to have their contributions accepted.

Contributor Covenant

This project is governed by the Contributor Covenant. All contributors and participants agree to abide by its terms.

See Also

fiber-local's People

Contributors

ioquatix avatar

Stargazers

George Kontridze avatar Love avatar Mezbah Alam avatar Alberto Colón Viera avatar Usman Anwar avatar Juri Hahn avatar  avatar Christoph Grabo avatar Stan Lo avatar Hasan Kumar avatar Tim Riley avatar Adam Daniels avatar Bruno Sutic avatar Delton Ding avatar Denis Talakevich avatar Takuya Uehara avatar

Watchers

James Cloos avatar Dade Niman avatar  avatar

fiber-local's Issues

'fiber-storage' outputs warning: Fiber#storage has borked keys and is being monkey-patched.

Abstraction

From fluent/fluentd#4488.

Looks like fiber-local uses fiber-storage from v1.1.0.
fiber-storage outputs the following warning message when require:

Fiber#storage has borked keys and is being monkey-patched.

fiber-local v1.0 does not output this warning because it does not use fiber-storage.

Fluentd uses console gem, and console v1.25 uses fiber-local v1.1.
So, this warning message occurs every time when executing Fluentd.

Is this a bug of fiber-storage or fiber-local?
Or is there something wrong with the usage?

(I can't find fiber-storage GitHub repository: https://github.com/socketry/fiber-storage, so I have made this issue here.)

How to reproduce

Ruby: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
OS: Ubuntu 20.04

fiber-storage:

$ gem install fiber-storage
$ gem list fiber-storage

*** LOCAL GEMS ***

fiber-storage (0.1.0)
$ ruby -e "require 'fiber/storage'"
Fiber#storage has borked keys and is being monkey-patched.

fiber-local:

$ gem install fiber-local -v 1.1.0
$ gem list fiber-local

*** LOCAL GEMS ***

fiber-local (1.1.0)
$ ruby -e "require 'fiber/local'"
Fiber#storage has borked keys and is being monkey-patched.
$ gem uninstall fiber-local -v 1.1.0
$ gem install fiber-local -v 1.0.0
$ gem list fiber-local

*** LOCAL GEMS ***

fiber-local (1.0.0)
$ ruby -e "require 'fiber/local'"
(no warning)

Fluentd:

$ git clone [email protected]:fluent/fluentd.git
$ cd fluentd
$ bundle
$ bundle exec gem list console

*** LOCAL GEMS ***

console (1.25.2)
$ bundle exec gem list fiber-local

*** LOCAL GEMS ***

fiber-local (1.1.0)
$ bundle exec fluentd --version
Fiber#storage has borked keys and is being monkey-patched.
fluentd 1.17.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.