Giter VIP home page Giter VIP logo

Comments (4)

alexandru avatar alexandru commented on May 27, 2024

👍

from funfix.

sledorze avatar sledorze commented on May 27, 2024

@alexandru
I don't have a lot of free time ATM but can come with that if it fits the requirements (looking for validation here)

So the actions would be:

Create a StackedUncancelable in funfix exec that does not nothing.

Implement uncancellable as a static (also as a class member?)

  static uncancellable<A>(io: IO<A>) {
    return IO.asyncUnsafe<A>((ctx, cb) => {
      const ec = ctx.scheduler;
      ec.trampoline(() => {
        const conn = stackedUncancelableRef; // stackedUncancelableRef being a singleton instance of StackedUncancelable defined in funfix-effect
        IO.unsafeStart(io, ctx, ioSafeCallback(ec, conn, cb));
      });
    });
    return io;
  }

Add the flow definitions (not versed into it, but looks definitely possible)

Everything with tests and frenchy english comments!

from funfix.

sledorze avatar sledorze commented on May 27, 2024

@alexandru sorry to bug you, but can you confirm / infirm on the approach?

from funfix.

sledorze avatar sledorze commented on May 27, 2024

@alexandru pinging again as I need safe cancellation to hit prod quite soon (not joking).
And would help making it happen, of course.

from funfix.

Related Issues (20)

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.