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

PHP Fibers & Node via PHP Exec

I'm testing out PHP Fibers and I'm having a problem, probably it's something silly :) Anyhow I have fibers running a loop and then inside that loop I have PHP exec with sudo nano... that works nice, however it runs 1 by 1, can I anyhow have the loop…
Brickr
  • 134
  • 1
  • 6
0
votes
1 answer

Fibers simple example

I'm trying to make some simple fibers work, but doesn't seem to go as expected. What am I missing here? Have never worked with fibers before The output I expected: iteration: 0 Fiber 1 is working! Fiber 2 is working! Fiber 3 is working (0)! (1 sec…
clarkk
  • 27,151
  • 72
  • 200
  • 340
0
votes
0 answers

Fiber safe optimizations in clang?

This talk was done in 2015: https://www.gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine concerning threading your program via fibers. In it, he talks about how msvc has a fiber specific optimization that helps to avoid some…
Jason
  • 2,198
  • 3
  • 23
  • 59
0
votes
1 answer

Why change of Child state causes Parent rerender in React

I made a small experiment while learning React https://codepen.io/bullet03/pen/abGoGvL?editors=0010: React 17.0 with Fiber 2 components: Agregator(Parent) and Counter(Child) Counter(Child) uses useState hook to change it's state NB!!!…
bullet03
  • 73
  • 5
0
votes
1 answer

The request body does not reach golang fiber

When I send a POST request, the server does not receive the request body. Only the id is added to the database "package lists import ( "github.com/fishkaoff/fiber-todo-list/pkg/common/models" "github.com/gofiber/fiber/v2" ) type…
fishkaoff
  • 19
  • 3
0
votes
0 answers

Sanic application context variable fiber thread safe or thread safe?

We have a server which is written in Sanic async/Python. I want to add a app.ctx variable, but this variable would be modified by an API called parse. This parse API supports concurrent calls. Perhaps every parse API call will add value/remove value…
0
votes
1 answer
0
votes
0 answers

Adding HTML to a React Three Drei 'Instance'

I've been looking at this example here: https://codesandbox.io/s/floating-instanced-shoes-h8o2d?file=/src/App.js Which uses from React Three Drei.. The docs: https://github.com/pmndrs/drei#performance say that html can be…
timhc22
  • 7,213
  • 8
  • 48
  • 66
0
votes
1 answer

What is the best way to update `HAS ONE` using gorm?

I have two models type User { ID uint `gorm:"primarykey" json:"-"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` Profile Profile `gorm:"constraint:OnDelete:CASCADE;"` } and type Profile…
Luqman Jr
  • 69
  • 1
  • 5
0
votes
0 answers

Replacement for node-fibers in Node 16

I am using node-fibers for webpack.config.js and I want to upgrade my Node version. Is there any replacement package that does what fibers does? Is my only option to refactor code at the moment? webpack.config.js: loader: 'sass-loader', …
Roh
  • 311
  • 1
  • 10
0
votes
2 answers

JavaScript native fibers

Do you know if native fiber support is planned in a future version of JavaScript? Indeed, it would be very cool if it was possible to write something like : console.log("sleep 3s..."); const value = wait (resolve, reject) => { setTimeout( …
user3515941
  • 141
  • 1
  • 8
0
votes
3 answers

How to reload Go Fiber in the terminal?

I am completely new to this community but would really appreciate if someone can help me with this problem I am facing. I am currently following the basic tutorial of the simple Hello World app but how can we update the code to say something else…
Usama Ahmed
  • 21
  • 1
  • 4
0
votes
2 answers

How to enable boost library in xcode

I have a problem with adding boost library to my project in Xcode. It seems that some parts of boost work correctly but when I use some of them I get the following errors. Example- boost fiber library: Undefined symbols for architecture arm64: …
Buhodozor
  • 3
  • 1
0
votes
1 answer

got error unsupported data type: &[]. this is gorm model + golang/jwt

Your Question Hello good day System specs go latest gofiber windows 11 postgres Am trying to run AutoMigrate but am having an error, everything was working fine but since last week i get the following error when i run my code. 2021/12/30 13:17:56…
tp45
  • 123
  • 4
  • 13
0
votes
0 answers

Can I dynamically apply a drop-down (select) box to the swagger using Go?

I'm using Swagger UI with Fiber in Go. As far as I know, Swagger can configure array [string] in this way. The current form requires entering enum in advance, and I want to add it as a script. Is there a way? Can I dynamically add Swagger UI…
dpa456
  • 27
  • 5