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
1
vote
0 answers

NOT ABLE TO PASS jwt token from header using golang fiber app.test

can anyone help me im trying to create function unit testing but i cant get pass jwt auhtentication because fiber app.test didnt pass any jwt value from authorization header i can get data if im using param but i cant use bearer if i use that my…
Ibrahim
  • 11
  • 2
1
vote
2 answers

How to stop and start gin server multiple times in one run

I'm writing a program that I need to Start and Stop my server (using Gin framework in this case) multiple times when my program is running, Stopping a gin server itself needed a trick that I found in this question: Graceful stop of gin server But…
Arsham Arya
  • 1,461
  • 3
  • 17
  • 25
1
vote
2 answers

How do I store the data from DTO Gorm

I am using golang fiber and GORM. I am trying to store the data from DTO. For example, I have created a post entity and post dto like below. type User struct { gorm.Model Name string Address string Phone string } This is my DTO type…
az rnd
  • 643
  • 3
  • 14
  • 28
1
vote
1 answer

Why does not this simple Producer-Consumer program using two boost::fibers work as expected?

Consider the following simplified program with a Producer and a Consumer. The latter is notified whenever an int is available from the former (in this simple case, every second). The notification is done by pushing the value into a…
AntVival
  • 11
  • 2
1
vote
1 answer

Error when executing "npm install fibers"

OS: Windows 10 node: 16.15.1 npm: 8.11.0 When running npm install fibers, I get an error. The whole log is too big, but here's the part where the error starts: 8024 info run fibers@3.1.1 install { code: 1, signal: null } 8025 info run fibers@5.0.1…
Andrew
  • 1,139
  • 1
  • 12
  • 27
1
vote
2 answers

Launching a boost fiber in thread 1 from thread 2

I have a main linux thread (th1) that runs a number of boost fibers that are scheduled using the boost priority scheduler. Every so often, I would like to launch a fiber from another thread (th2) that will run in th1 and be scheduled along with the…
glaird
  • 55
  • 1
  • 1
  • 7
1
vote
0 answers

Connectivity Tunnel including IAM security in python with paramiko

I am already using python for connecting to remote server through jump server with paramiko and executing SSH commands through python in jupyter notebook which resides on user's local machine. Now, I have following connectivity challenge where…
annonyos
  • 68
  • 1
  • 1
  • 6
1
vote
1 answer

How to use multiple async fread with Fibers in PHP?

I would to like to get contents from each url in a list using fread and Fibers where each stream does not need to wait a feof to run another fread in another url My current code is the follow:
celsowm
  • 846
  • 9
  • 34
  • 59
1
vote
0 answers

What is the difference between Boost.Context fiber and continuation?

Boost.Context provides two mechanisms for switching contexts: fiber - https://www.boost.org/doc/libs/1_74_0/libs/context/doc/html/context/ff.html continuation - https://www.boost.org/doc/libs/1_76_0/libs/context/doc/html/context/cc.html These…
emptysamurai
  • 161
  • 1
  • 6
1
vote
1 answer

Fiber web framework can not send ajax request

Forgive me, but I do not know English well. I use the translator deepl.com. At this point Russian programmers could not help me. I am not a programmer, "I program only for myself". I have a problem - I can't send POST (JSON) request to server. What…
sdima75
  • 13
  • 2
1
vote
1 answer

Go-MongoDriver decoding JSON array weirdly

Heyho party people, I've recently took up learning Go and started working on a small side project which includes a API written using the Go Fiber library. All the necessery data is stored in MongoDB with the following schema { "ObjectId": { …
devcayed
  • 37
  • 6
1
vote
1 answer

Return a value from inside a Fiber

I'm trying to provide a collection having its methods wrapped in fibers for synchronous looking calls. const Fiber = require('fibers'); const wrapInFiber = require('./wrapInFiber'); let db; Fiber(function () { db = wrapInFiber({ url:…
Harry Adel
  • 1,238
  • 11
  • 16
1
vote
0 answers

Async and scheduling - how do libraries avoid blocking at the lowest level?

I've been using various concurrency constructs for a while now without much consideration for how all the magic happens, which has recently made me increasingly uneasy. In an attempt to remedy this ... feeling, I have been reading up on how async…
Solaxun
  • 2,732
  • 1
  • 22
  • 41
1
vote
1 answer

Does Boehm GC recognize the stacks of Win32 Fibers as roots?

What differences are there in the handling of Threads vs Fibers in Boehm GC? Win32 CreateFiber only takes a desired stack size and allocates it without giving the user access to the stack pointer (as far as I can tell). Does Boehm GC recognize the…
1
vote
0 answers

Fibers error while upgrading project node version from 8.10 to latest version 12

I have upgraded node version 8 to 12 and then deleted node_modules and package-lock.json then i have run the below cmd to upgrade all the compatible modules. npm update then, while doing "npm install", getting this error gyp ERR! build error gyp…