Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Croupier version v0.3.1 is out

A new release of Croupier my Crystal library for tasks and dataflow programming is out!

What's Changed

  • In­­o­ti­­fy sup­­port by @ral­si­­na in #1

    This adds the TaskMan­ag­er.au­to_run method that mon­i­tors task in­puts and
    re­runs tasks as need­ed, and TaskMan­ag­er.au­to_stop to stop it.

    This will be use­­ful for Hacé (the croupier-based make-­­like) and Nicol­i­no
    (a SS­G)

    Here's an ex­am­­ple from the test­s:

    x = 0
    counter = TaskProc.new { x += 1; x.to_s }
    Task.new(output: "t1", inputs: ["i"], proc: counter)
    TaskManager.auto_run
    #  We need to yield or else the watch call­backs nev­er run
    Fiber.yield
    File.open("i", "w") << "foo"
    Fiber.yield
    TaskManager.auto_stop
    #  It should have run
    (x > 0).should be_true

Full Changel­og: v0.3.0...v0.3.1


Contents © 2000-2024 Roberto Alsina