
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
h1. Celluloid Promise
!https://secure.travis-ci.org/cotag/celluloid-promise.png!
A promise / deferred implementation for Celluloid inspired by "AngularJS":http://docs.angularjs.org/api/ng.$q / "Kris Kowal's Q.":https://github.com/kriskowal/q
From the perspective of dealing with error handling, deferred and promise apis are to asynchronous programing what try, catch and throw keywords are to synchronous programming.
require 'rubygems'
require 'celluloid-promise'
def asyncGreet(name)
deferred = Celluloid::Q.defer
Thread.new do
sleep 10
deferred.resolve("Hello #{name}")
end
deferred.promise
end
asyncGreet('Robin Hood').then(proc { |greeting|
p "Success: #{greeting}"
}, proc { |reason|
p "Failed: #{reason}"
})
asyncGreet('The Dude').then do |greeting|
p "Jeff '#{greeting}' Lebowski"
end
h2. Start using it now
h2. Use case
Celluloid provides a toolkit for building concurrent applications however coordinating complex chains of concurrent events can be difficult. Celluloid-Promise provides the following:
Of course passing blocks around is a fairly "dangerous exercise":https://github.com/celluloid/celluloid/wiki/Blocks#proposal-for-fixing-blocks, so do the following and you'll be safe
FAQs
Unknown package
We found that celluloid-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.