Questions tagged [fiber]

Fibers are particularly lightweight threads of execution which use co-operative multitasking.

In computer science, 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. The article on threads contains more on the distinction between threads and fibers.

Fibers can be considered as implementation of coroutines so you might like to check also [coroutine] tag.

98 questions
2
votes
3 answers

How do I use Ruby1.9 with Shoes?

Shoes wraps it's own Ruby install, right? I can't use Fiber which is a Ruby1.9 feature. And, I want to use a Fiber for creating a generator. Here's my code (so you can make sure the problem isn't with my code): class BrownianGenerator def…
bias
  • 1,467
  • 3
  • 19
  • 39
1
vote
2 answers

Using windows fiber in a simple way but unexplainable bugs occur

I played around with windows fibers implementing my own task scheduler when some odd crashes and undefined behaviors occurred. For the sake of simplicity I started a new project and wrote a simple program who performs the following operations: The…
Qzaac
  • 159
  • 1
  • 8
1
vote
1 answer

Why a segmentation fault occurs calling a function inside setjmp()?

I do not understand why in the function middleFunc(), a segmentation fault is raisen when entry_point(arg) is invoked inside the if ( setjmp(middle) ) statement. #include #include jmp_buf start,middle,end; …
Angelo
  • 334
  • 4
  • 14
1
vote
1 answer

Fibers / Coroutines vs Delimited Continuations

So I read a paper about concurrent work stealing deques here: http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3872.pdf. They mention "Child-Stealing vs Continuation Stealing" and they say that child stealing can require unbounded stack space to…
Jesse Lactin
  • 301
  • 3
  • 12
1
vote
1 answer

oVirt Multipathing MPIO Fibre Channel how to?

I have a question regarding oVirt and multipathing. I have a cluster with 4 hosts and a storage system (Dell EMC) connected via fibre channel. At the moment I have a SAN Switch between the hosts and the storage system, but I want to attach the hosts…
1
vote
1 answer

Why to call a fiber inside JNI throws a StackOverflow in JVM?

I think this is a difficult question also here. Anyway i want try. I realized a mini project JNI porting native boost fibers inside Java. This is JNI interface inline void execute(JNIEnv * env,jobject runnable,jmethodID mid){ cout << " 31---" …
1
vote
1 answer

Can segmented stacks be used freely with other libraries

The way I understand it, segmented stacks are built with compiler support so that whenever a function running on the segmented stack calls another function, if first checks whether the stack has enough space for the stack frame for that new…
Curious
  • 20,870
  • 8
  • 61
  • 146
1
vote
1 answer

Get amount of open fibers in ruby

How can I get the current amount of open Fibers in a ruby application? My app uses EventMachine Synchrony lib for concurrency handling. While googling, I've not found any API which would return it. For example if I have this piece of…
1
vote
2 answers

Error: Can't wait without a fiber

Hello everyone i've a callback function in one route with Iron Router in my meteor project. The issue is when i run the path localhost:3000/scraper, the console shows the below message: Error: Can't wait without a fiber This code scrape to one page…
beriliox
  • 267
  • 6
  • 18
1
vote
1 answer

when execute after fiber.detach()?

void helloFiber(boost::fibers::future &f) { cout << "Hello, boost::fiber" << endl; f.get(); } int main() { boost::fibers::promise pm; boost::fibers::future ft = pm.get_future(); { boost::fibers::fiber…
1
vote
1 answer

Is Vibe.D multi-threaded to handle concurrent requests?

I know that Vibe.D implementation is based on Fibers. But I don't know how high load scenarios are handled by Vibe.D. Is it the scheduler in Vibe.D allocating fibers on multiple threads or just one thread for all fibers? This consideration is very…
1
vote
1 answer

Can I assume SettableFuture in quasar as a Fiber?

Can I assume a SettableFuture acting as a Fiber in asynchronous code or not (It should be assumed as a ForkJoinTask)? A Quasar SettableFuture can block fibers in addition to threads. SettableFuture API Parallel Universe Comsat Documentation
Alireza Mohamadi
  • 751
  • 1
  • 6
  • 22
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

Is there a way to maintain multiple stacks/instruction pointers in LLVM?

I've been writing a toy language for LLVM. The most ambitious feature I want to implement is fibers. I've read much about the matter, and I think I have a vague idea of how they are traditionally implemented. As far as I can tell, fibers are usually…
Others
  • 2,876
  • 2
  • 30
  • 52
1
vote
2 answers

Why boost::fiber blocks?

I'm trying to play with boost::fiber library but I have the problem with the "Hello, World" example. In the following code the program flow blocks after the fiber is finished and the main function never returns. #include #include…
bobeff
  • 3,543
  • 3
  • 34
  • 62