Questions tagged [node-fibers]

A fiber is a particularly lightweight kernel thread scheduler dependent thread of execution using co-operative multitasking.

A fiber is a particularly lightweight thread of execution.

Like threads, fibers share address space. However, fibers use co-operative multitasking while threads use pre-emptive multitasking. Threads often depend on the kernel's thread scheduler to preempt a busy thread and resume another thread; fibers yield themselves to run another fiber while executing.

node-fiber introduces Fiber support for v8 and Node JS

Source: Wikipedia

114 questions
1
vote
1 answer

Problems running Meteor in docker -> fibers.node is missing

I'm trying to run my Meteor Project in a docker container but I'm seeing the following error: => Starting app on port 3000... ## There is an issue with `node-fibers`…
xQp
  • 302
  • 1
  • 5
  • 22
1
vote
0 answers

Node.js fibers and assignment operators

Fibers and assignment operators work weirdly! It appears that using the += operator with a function doing a pause causes a bug. In this example, I launch 10 tasks in parallel, each one adds one to the sum. When work is done, the sum should be equal…
1
vote
1 answer

Meteor wrapAsync or bindEnvironment without standard callback signature

I'm trying to call createTableIfNotExists in this npm package, and do so synchronously in Meteor, server-side. https://www.npmjs.com/package/azure-storage However, the callback signature is of type function(error, result, response) instead of the…
ASX
  • 635
  • 7
  • 18
1
vote
1 answer

meteor: cannot find module fibers/future while writing meteor method in typescript

I am using meteor with angular2 using typescript es6 and i encountered this error while writing a meteor method for async function. I am facing a sync problem in the insert query because it is not supplying me with an error on insert when the name…
shyam padia
  • 397
  • 4
  • 16
1
vote
2 answers

What is the difference between run vs yield in node-fibers

I can't find any good documentation (or any question on SO) that explains how exactly yield and run works. I am not able to find how would an asynchronous method will be able to return a value using Fibers/futures. For example (code not…
gurvinder372
  • 66,980
  • 10
  • 72
  • 94
1
vote
0 answers

Exception in callback of async function: Error: Future resolved more than once

Hi guys I try to use proxy-verifier NPM package in Meteor like below: import ProxyVerifier from 'proxy-verifier'; // this is my method call on server startup Jobs.find().forEach((job) => { Meteor.call("checkProxy", job.proxy, (error, result) => { …
b24
  • 2,425
  • 6
  • 30
  • 51
1
vote
1 answer

fibers install not possible on ubuntu 14.04

When I try to install fibers, I get this errormessage. I have Node version 0.10.45 for the use Meteor 1.3.2 on Ubuntu 14.04 64 Bits on a Strato VPS. When I do a meteor build I need to run npm install fibers inside of programs/server of the build…
Tobi
  • 1,175
  • 1
  • 19
  • 44
1
vote
0 answers

Is this the correct way to use fibers/future in express?

I have a bunch of code in express which needs to be run synchronously. To achieve this I am using fibers/future library. The code is working properly but I am not confident that if it is the best way to achieve sync code from…
Nikhil Parmar
  • 876
  • 2
  • 11
  • 27
1
vote
0 answers

Fiber restart callback issue

I would like to stop (gracefully or not) a function run via fibers. Fibers have throwInto() and reset() methods for doing that. But when I use it, my callback restart. Do you know why ? Here a little example for what I have done. Code: Fiber =…
1
vote
2 answers

Meteor wrapAsync / Node Fiber Future Not working

I am trying to get json data from one API using Meteor Method, I have tried to use meteor wrapAsync as well as Node Future. Below is my code: Template Helper - Client Side getLocationTimebyAPI: function (company_location) { …
Manu
  • 301
  • 2
  • 9
1
vote
2 answers

"No fiber running" while trying to parse a csv line by line

I'm trying to understand how I can use a Fiber within fast-csv to make a line-by-line reader (single user command line script) that pauses reading/processing at each line until that line has completed a variety of async calls. (without rolling my…
sday
  • 1,041
  • 14
  • 22
1
vote
1 answer

Nested Async Functions - Future return running inside Fibers

I need to run two nested async functions and return callback from the second one to the client. future.return doesn't work inside Fibers. How to return result to the client without using collections? Meteor.methods({ 'youtube':function(object)…
mhlavacka
  • 691
  • 11
  • 25
1
vote
0 answers

Meteor didn't stop fibers execution

I want to upload csv file and insert it into db after huge validation and some process. I am using fibers for asynchronous call. But the fiber process keep executing even fiber returns future.wait();. Meteor.methods({ uploadCSV: (calender) { …
Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67
1
vote
1 answer

Meteor Up error when deploying to Digital Ocean, Ubuntu 14.04

Having trouble deploying a Meteor project to an Ubuntu 14.04 (kernel: Ubuntu 14.04 x64 vmlinuz-3.13.0-57-generic) instance on Digital Ocean using Meteor Up. mup setup runs fine, so no problems in mup.json. Then, when I run mup deploy I get: Started…
demiters
  • 596
  • 7
  • 28
1
vote
1 answer

Proper Meteor error handling with async calls using Future

I am wondering how to properly handle errors with Meteor when using async methods. I have tried the following, but the error is being returned in the result parameter on the client callback instead of the error parameter. Server code: Future =…
Jean-François Beauchamp
  • 5,485
  • 8
  • 43
  • 77