Questions tagged [fibers]

A fiber is a lightweight thread which uses cooperative rather than preemptive multitasking. It is very similar to and often confused with a [coroutine]. Use this tag for questions relating to the [ruby] feature, otherwise prefer to use [coroutine].

A fiber is a lightweight thread which uses cooperative rather than preemptive multitasking. It is very similar to and often confused with a .

In Ruby, fibers are primitives for implementing light weight cooperative concurrency. It appeared in Ruby 1.9.

Related tags

189 questions
0
votes
1 answer

Is it possible to inspect a suspended fiber's call stack?

Visual Studio has the capability of inspecting suspended threads and their call stack. Is it possible to inspect a suspended fiber's call stack, given a fiber handle? The goal is to have more debugging information about suspended fibers (and to…
Selmar
  • 722
  • 1
  • 5
  • 12
0
votes
1 answer

problem with understanding example of code from Boost.Fiber library

I am currently trying (in order to learn) to understand example of code from the Boost.Fiber library : https://www.boost.org/doc/libs/1_71_0/libs/fiber/examples/work_sharing.cpp // Copyright Nat Goodspeed + Oliver Kowalke 2015. //…
Benzait Sofiane
  • 107
  • 1
  • 12
0
votes
0 answers

Meteor bundle cannot run command: node main.js

I have run meteor build in one of my meteorJS apps and then extracted the bundle and After running npm install in programs/server I face an error when I try to run node main.js in root fold I have tried to search for npm package called topologies to…
0
votes
2 answers

Future not working properly

const Future = require('fibers/future') function myfunc() { var future = new Future(); Eos().getInfo((err, res) => { future["return"]=res; }) return future.wait(); }; console.log(myfunc()); The Error is can't wait without a…
yash vadhvani
  • 329
  • 2
  • 12
0
votes
1 answer

Quasar fiber - difference between join() and get()

The title says it all. There's no explicit instructions on these two methods as to which should be used.
user6332430
  • 442
  • 10
  • 29
0
votes
0 answers

using lambda that captures a promise as a callback

I want to use boost fibers to accomplish async communication with an external service. I use a set of promise and future for each individual fiber to be called on a separate reader fiber in order to wake up the originator fiber that waits for a…
Mass
  • 123
  • 11
0
votes
1 answer

i got 'boost::fibers::lock_error' and can't figure out why

i run this code class ttt { public: ~ttt() { LOG(INFO); flush(); } bool flush() { //std::lock_guard lock(_mutex); LOG(INFO); _mutex.lock(); LOG(INFO); auto…
beegerous
  • 11
  • 2
0
votes
1 answer

Meteor Fibers error - across different versions of Meteor

I have 3 meteor applications all at different versions App#1 (v1.2.1) App#2 (v1.3.2.1) App#3 (v1.4.1) Apps #1 & #3 are running fine. But App#2 gets the following error message module.js:340 Error: Cannot find module 'fibres' In desperation, I…
0
votes
1 answer

fibers not working in meteor react - Error: Meteor code must always run within a Fiber

I am using fibers in meteor + react on server side. I have created an api (using nimble:restivus package of atmospherejs) but I am getting an error on server's log var response = {}; var url = //any server url var Future = Npm.require(…
0
votes
1 answer

Simple parallelism with Fibers?

I'm trying to validate a basic yield/resume pattern with two Fibers. However, the yield/resume mechanism doesn't seem to work. I have tried a few variations but can't find my mistake. Expected sequence of events: kick off threads (time 0) wait…
saarp
  • 1,931
  • 1
  • 15
  • 28
0
votes
1 answer

Meteor.js server method queue

I have a method in Meteor that takes a bit of time to execute, and this method is called a lot of times with different params. But the client can change the params while the data is still being loaded, so I want the server to be able to clear the…
m0rfarpeter
  • 397
  • 1
  • 3
  • 12
0
votes
2 answers

User32 SendMessage hanging when message pump is sitting idle

I have a multi-threaded dll for a third-party application. My dll invokes messages onto the main UI thread by calling SendMessage with a custom message type: typedef void (*CallbackFunctionType)(); DWORD _wm; HANDLE _hwnd; DWORD…
Bryce Wagner
  • 1,151
  • 7
  • 18
0
votes
1 answer

What is the potential issues of using fibers in node.js?

I am planning to experiment the use of fibers in node.js? What are the potential issues that I should consider? Looks like fibers really the opposite of the nice design of simplicity of event-loop and single thread design of node.js.
0
votes
1 answer

How to use wrapAsync in Meteor

I am having trouble figuring out how to use wrapAsync properly using Meteor. I am currently working with node-apac and the Amazon Product Advertising API. If am trying to run the following code, how do I run it…
David Mckee
  • 1,100
  • 3
  • 19
  • 35
0
votes
2 answers

swapcontext segfaults when swapping to a ucontext_t's uc_link

I'm working on writing a small, proof of concept fiber library in C using the usual makecontext/swapcontext routines, however that's been giving me some trouble (My platform is OSX 10.9 Mavericks, using clang-503.0.40). Here's the data structures…
dymk
  • 887
  • 2
  • 10
  • 21
1 2 3
12
13