JavaScript is known to be single-threaded in all modern browser implementations, but is that specified in any standard or is it just by tradition? Is it totally safe to assume that JavaScript is always single-threaded?...
Does anyone know what the memory and threading models are in nodejs?  In particular, is ii++ atomic? Does it behave as if ii were volatile in Java 1.5, in Java 1.4, in C, or not at all?...
I'm trying to find a good pattern to execute a bunch of parallel tasks.  Let me define some task to exemplify. Tasks a, b, c, d, e, f, g execute as a(function(er, ra){//task a returned, ra is result}), so do b to g  There are also some tasks that...
Have looked around and can't quite find the answer. I am trying to run a promise which executes a fulfil statement once all facebook api pages have been iterated through and saved to an array.   I know the function's ugly but I'm having a...
Greetings,  I've been studying javascript, nodejs.  And I don't understand how the concurrency issues are avoided in javascript.  Lets say I'm working on a object   var bigObject = new BigObject();   and I have a setTimer(function(){ work...
Suppose we have a simple application where users can create products and comment them. The schema for products and comments could be:  var productSchema = new mongoose.Schema({   author_id: ObjectId,   description: String });  var commentSchema = new...
(The first obstacle when posting this was deciding on a good title - hope I did OK with that.)  I'm slightly bewildered by how the native JavaScript Promise object behaves (tested in Chrome and Firefox in Windows 7), and whether or not they actua...
I have a need a create a temporary "scratch" directory on-demand in node.js.  The requirements are:   the dirname should be randomized (i.e. /tmp/aDIge4G/ the directory will be created within /tmp which may already have other randomly named d...
I'm writing server-side logic for a Meteor app that has to update in-memory state in response to requests from the client. This application needs strong concurrency guarantees - in particular, I want to be sure that there is only one update execu...
How do I write a method that limits Q promise concurrency?  For instance, I have a method spawnProcess. It returns a Q promise. I want no more than 5 process spawned at a time, but transparently to the calling code.  What I need to implement is a fun...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.