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...
I am trying to implement a cross tab mutex for my needs. I found a implementation here.    which seems quite promising. Basically, it implements Leslie Lamport's algorithm with needs atomic read/writes for creating a mutex.  However it relies on...
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...
I have code like the following:  window.history.back(); myFunction(10);    Is history.back() a blocking / non-blocking call? Is there an assurance that myFunction() will be executed? or will not be executed? Is this a possible race condition where hi...
As an educational project, I'm writing (yet another) editor-style live syntax highlighter in JavaScript.  To keep the editor responsive I obviously opted to have the highlighter run asynchronously, however with the model I'm using I need to b...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.