HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
scriby
asyncblock
JavaScript2012–2013
scriby / asyncblock

asyncblock

Synchronous style code in an asynchronous world

2Distinct people
10Mentions
1Explicit recommenders
191GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Synchronous style code in an asynchronous world

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

For those interested in the fibers way of doing things, I recommend checking out https://github.com/scriby/asyncblock. It provides an easy-to-use abstraction to get the best of…

scriby used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month10 dated mentions

Observed mentions: 2012-01-25 20:58:44 UTC to 2013-12-02 17:10:01 UTC.

0122012-01-01 00:00:00 UTC to 2012-02-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsJan 20122012-02-01 00:00:00 UTC to 2012-03-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2012-03-01 00:00:00 UTC to 2012-04-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2012-04-01 00:00:00 UTC to 2012-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-05-01 00:00:00 UTC to 2012-06-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2012-06-01 00:00:00 UTC to 2012-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-07-01 00:00:00 UTC to 2012-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2012-08-01 00:00:00 UTC to 2012-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-09-01 00:00:00 UTC to 2012-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-10-01 00:00:00 UTC to 2012-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-11-01 00:00:00 UTC to 2012-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-12-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 20122013-01-01 00:00:00 UTC to 2013-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-02-01 00:00:00 UTC to 2013-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-03-01 00:00:00 UTC to 2013-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-04-01 00:00:00 UTC to 2013-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-05-01 00:00:00 UTC to 2013-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-06-01 00:00:00 UTC to 2013-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-07-01 00:00:00 UTC to 2013-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-08-01 00:00:00 UTC to 2013-09-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2013-09-01 00:00:00 UTC to 2013-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-10-01 00:00:00 UTC to 2013-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-01 00:00:00 UTC to 2013-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 2013

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 20122012-01-01 00:00:00 UTC2012-02-01 00:00:00 UTC211
Feb 20122012-02-01 00:00:00 UTC2012-03-01 00:00:00 UTC101
Mar 20122012-03-01 00:00:00 UTC2012-04-01 00:00:00 UTC101
Apr 20122012-04-01 00:00:00 UTC2012-05-01 00:00:00 UTC000
May 20122012-05-01 00:00:00 UTC2012-06-01 00:00:00 UTC211
Jun 20122012-06-01 00:00:00 UTC2012-07-01 00:00:00 UTC000
Jul 20122012-07-01 00:00:00 UTC2012-08-01 00:00:00 UTC101
Aug 20122012-08-01 00:00:00 UTC2012-09-01 00:00:00 UTC000
Sep 20122012-09-01 00:00:00 UTC2012-10-01 00:00:00 UTC000
Oct 20122012-10-01 00:00:00 UTC2012-11-01 00:00:00 UTC000
Nov 20122012-11-01 00:00:00 UTC2012-12-01 00:00:00 UTC000
Dec 20122012-12-01 00:00:00 UTC2013-01-01 00:00:00 UTC101
Jan 20132013-01-01 00:00:00 UTC2013-02-01 00:00:00 UTC000
Feb 20132013-02-01 00:00:00 UTC2013-03-01 00:00:00 UTC000
Mar 20132013-03-01 00:00:00 UTC2013-04-01 00:00:00 UTC000
Apr 20132013-04-01 00:00:00 UTC2013-05-01 00:00:00 UTC000
May 20132013-05-01 00:00:00 UTC2013-06-01 00:00:00 UTC000
Jun 20132013-06-01 00:00:00 UTC2013-07-01 00:00:00 UTC000
Jul 20132013-07-01 00:00:00 UTC2013-08-01 00:00:00 UTC000
Aug 20132013-08-01 00:00:00 UTC2013-09-01 00:00:00 UTC101
Sep 20132013-09-01 00:00:00 UTC2013-10-01 00:00:00 UTC000
Oct 20132013-10-01 00:00:00 UTC2013-11-01 00:00:00 UTC000
Nov 20132013-11-01 00:00:00 UTC2013-12-01 00:00:00 UTC000
Dec 20132013-12-01 00:00:00 UTC2014-01-01 00:00:00 UTC101

What Hacker News says

10 sources
It would be tough for Fibers to be totally abandoned, as http://www.meteor.com/ relies on it. I don't think it's really needed any code updates recently, as it works on Linux / OS X / Windows and all recent versions of node. I think it's somewhat hard to tell what the adoption of fibers looks like, as it typically wouldn't be used by other modules in npm. You don't want to force people using your module to use fibers. So, it would mostly see its usage in applications. It will be interesting to see what happens to fibers once generators ship with core node (available now under the --harmony-generators v8 flag). The most compelling reasons for using fibers can also be met by using generators. (I maintain a library built on top of fibers: https://github.com/scriby/asyncblock)
In Why does it seem like threading and fibers in Node have been abandoned?
Will these examples protect you from thrown exceptions? Null reference exception? Oops, your callback isn't getting called -- and you're probably leaking resources or leaving things in an inconsistent state. So the recommendation is to restart the process - but let's not forget that hundreds+ of other requests could currently be in the pipeline - are we just going to abort those too? Ok, we'll clearly the solution is to wrap all our callbacks with try/catch! Shoot me now... For large, sprawling applications used to support a business, something like https://github.com/scriby/asyncblock can resolve most of the headaches with async code, including error handling. It's worked out well for my team at work, which is building a "very large" node application. Disclaimer: Asyncblock is my pet project.
In Node.js error handling
V8 isn't really designed to run multi-threaded code, which makes sense, since it's designed to run JavaScript code for the browser, and browser JS is single-threaded (except for Web Workers, which are isolated, and isolation requires a different style of code just like asynchronicity does). Here's one effort to add multithreading to V8: http://code.google.com/p/v8-juice/wiki/ThreadingInJS However, it has limitations because V8 isn't really intended to be used that way. If you just want to write code in blocking style, you can use asyncblock with node.js: https://github.com/scriby/asyncblock
In The love and hate of Node.js
This appears only to support one-at-a-time synchronous control flow. Giving up parallel tasks is a funny proposition in node, as it's one of its greatest strengths. So this framework still seems limited in the potential uses, but maybe it will grow over time. I wrote a library based on fibers that can provide similar benefits to any node application. It also gives simple patterns for error handling, makes debugging easier by maintaining stack traces across async boundaries, and provides really easy ways to do series and parallel flow control. Take a look at https://github.com/scriby/asyncblock. It would actually be pretty cool to integrate asyncblock into this project as it could provide the flow control portion for free.
In Ace - Sinatra for Node with Fibers

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.