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?...
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 have a situation where I am making several (say four) ajax calls (using AngularJS http get, if that matters) and I want each call to callback and increment a counter, so I can know when all (four) of the threads have completed.  My concern is that...
I'm intending to use web worker inside my Node.js application for some concurrent tasks. However since the 'webworker-threads' module follows the implementation of HTML5 web worker, requiring Nodejs modules like require("fs") insi...
I have a CSV file that I am reading in as a stream, and using transforms to convert to JSON and then asynchronously store each line to a DB.  The issue is that reading from the file is fast, and so leads to very large numbers of concurrent async DB o...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.