Giter Site home page Giter Site logo

greenback's People

Contributors

davidbrochart avatar mikenerone avatar oremanj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jab davidbrochart

greenback's Issues

use greenback to yield across generators

Hi,

The problem is describe here.

Somehow, I found greenback makes the sync code can interact with async code in async context. My 2nd attempts somehow works out, but the queue is not limited to 1, which set as max_size.
Also, is there any recommendation for my example code. It really messed up to get result from in-thread event loop.

Request for Conda package

In our latest release at Prefect, we added greenback as a dependency and noticed that it is not available on conda-forge or other channels, which definitely presents a challenge for us.

Would it be possible to consider creating a Conda package for greenback and hosting it on conda-forge?

We would also be happy to assist or contribute to this process, in terms of writing the recipe.

Thanks for your time!

Isolated usage of greenlets

Thanks for the library!

Prefect has been doing some experimenting with greenback here and ran into this limitation because SQLAlchemy is also used:

Unfortunately using greenback alongside sqlalchemy is not possible at this time. If the ephemeral application is running in the same thread as one in which we need to use greenback, then greenback and sqlalchemy will accidentally "mix" messages and crash each other.

The workarounds for this such as running in a separate thread have their own drawbacks

Is this kind of isolation something that could be handled at the greenback level? Or is this more of a limitation of the way greenlets and/or SQLAlchemy works?

Support for cocotb asynchronous IO framework

Hi,

I am trying to port synchronous python code to asynchronous with the minimum amount of effort. This code contains about thousand functions with thousand calls which make it annoying to properly port as this requires adding async/await keywords everywhere.

greenback framework looks like to be exactly what i need. I've tested it using asyncio and that fulfills my needs.
However i want to use this not with trio or asyncio but with cocotb which is also an asynchronous IO framework but running in a special HDL simulator, in this case moselsim/questasim. This is for embedded electronics development on FPGAs.

When using greenback as described in the documentation i get the early complaint that it is not supported.

I am wondering how much effort it is to enable support of a new asynchronous IO framework for greenback and what that means exactly. I would assume cocotb is very closely related to asyncio but that's only an assumption.
cocotb documentation/sources can be found here:
https://www.cocotb.org/
https://github.com/cocotb/cocotb

If you can provide some help would be very useful.
Thanks
Nicolas

bestow_portal() from within a greenback context creates improper nesting

bestow_portal() runs the first step of greenback_shim synchronously, which captures greenlet.getcurrent() as the "parent" greenlet. If bestow_portal() is run from another task that is already using greenback, this has the effect of forcing the bestowed-upon task to run using the calling task's contextvars.Context. We should delay the greenlet.getcurrent() call until at least the second _greenback_shim step, in order to make sure we're executing it in the new task's context.

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.