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

Error:interface must be a pointer to struct Error Returned in fiber (golang), how to solve this?

I'm new in Golang Programming I'm Faceing an issue.. I'm trying to acces my sent body data by "BodyParser"functtion But I got an error schema: interface must be a pointer to struct I'm Giving the Function Bellow func CreateService(c *fiber.Ctx)…
Fahim Ahmed
  • 43
  • 1
  • 7
0
votes
1 answer

How to Compare Hashed Passwords in Golang?

I was trying to build a login system on Golang's Fiber Farmework and am using Mysql as a database. I can easily Hash my password but cannot compare if the given password and the stored password is same or not I've used…
Fahim Ahmed
  • 43
  • 1
  • 7
0
votes
1 answer

Global Variable Gives SIGSEGV

I am using Fiber to develop a backend. I have a map that is a global variable that holds the socket connections. When I use the global variable from the same package, no problem here, everything works fine. But, when I try to use the sockets from a…
EmreSURK
  • 419
  • 3
  • 13
0
votes
1 answer

How are meteor fibers implemented and are they actually not blocking the single thread of node?

I've been recently dealing with Meteor (kind of legacy) code. I know the backend code makes (type wise) blocking calls to Mongo, but I have been told these calls work on fibers. From what I've seen these code running on fibers looks exactly the same…
caeus
  • 3,084
  • 1
  • 22
  • 36
0
votes
1 answer

Nuxtjs site deploy fails in Netlify when using sass/scss + fibers

The deploy fails on Netlify whenever I include any SCSS. If I take out the SCSS it deploys fine. It runs fine locally. You can easily recreate this by pulling the repo here https://github.com/jackcunningham/sasstest or with a fresh nuxt install…
codycustard
  • 448
  • 1
  • 4
  • 10
0
votes
1 answer

how to get the latest data in the postgresql database using the golang fiber programming language with GORM?

i've created a struct type Humid struct { Id int Sensor_id int Value float32 CreateAt time.Time } and this is to connect to db func PostgreSQL() { dsn := "host=localhost user=…
0
votes
2 answers

React renders based on state change but not on prop change?

The reason I'm having this question is that I do not see how React renders based on prop changes. On each fiber, beginWork renders the fiber, and if there's any state change, it'll mark the change. And if there isn't, it could…
windmaomao
  • 7,120
  • 2
  • 32
  • 36
0
votes
1 answer

Rendering templates in a Go Fiber application

Does anyone have good examples of gofiber and templates ? I am trying to display a list of videos through go fiber Html templates Here is my Go code (entity) : type Video struct { Id int `json:"id"` Title string…
guillaume guerin
  • 357
  • 2
  • 6
  • 17
0
votes
1 answer

quasar fiber returning empty results after the thread is started

I am testing my POST endpoint locally on my spring boot application. I have a method that spawns a fiber thread to run a set of instructions that calls an endpoint A and my POST endpoint returns the results returned by A. However, when my POST…
Chia Yi
  • 562
  • 2
  • 7
  • 21
0
votes
1 answer

Cannot get value from session store in gofiber session

I am working with fiber golang framework. I can't figure out why I cannot get the value set in the store(Redis in this case) from another request or within. Below is the code: sessionProvider := redis.New(redis.Config{ KeyPrefix: "session", …
0
votes
1 answer

Npm install on cpanel server for Vue Nuxt application is not working?

I am trying to run npm install in the cpanel terminal for a project but it gives me errors. Firstly I enter the virtual environment in the cpanel terminal as described by cpanel when you create a node application with the interface. I write the…
T. Smith
  • 3
  • 2
0
votes
1 answer

Demystifying Ruby "Fiber" internals

I am learning about the Ruby Fiber which gives lot of flexibility but I came up with some doubt's in Fiber as well as in Ruby. require 'fiber' class MyObj def call_yield print "Prepare to Yield" print "foo bar" Fiber.yield …
chellathurai
  • 115
  • 1
  • 1
  • 8
0
votes
1 answer

How to handle fiber exception outside of fiber?

Sometimes you need to work with unmaintained, old, dirty, huge and sort of libraries that can be dangerous for our program. Is there have the best practices for execution this code in a safe way? Recently I found (probably on my knowledge and…
Sergey Fedorov
  • 3,696
  • 2
  • 17
  • 21
0
votes
2 answers

Send and read data through socket from fiber

Trying to figure out how to send/read data through socket. On remote server I create new netcat -l 4444 and from local send text data echo "test" | netcat remote.host 4444. This is always works fine. Trying to reproduce: require "socket" HOST =…
Sergey Fedorov
  • 3,696
  • 2
  • 17
  • 21
0
votes
0 answers

Properly shutdown a fiber based job system

I have difficulties to properly shut down a job system I implemented. Currently I have a main thread posting jobs in a loop and worker threads executing jobs in a loop : void thread_proc(void *param) { Job job; while(running) { …