Q. I wanted to start two fibers in one instance. The first one started successfully, but it seems the second one didn't start at all.
On the instance:
local m = require('test').start()
local function start frun = fiber.create(queue.run(pool)) ffill = fiber.create(queue.fill(pool))
queue.run is working,
queue.fill is not. What did I do wrong? (2017)
A. You need to pass in parameters differently:
fiber.create(queue.run, pool) - this is going to work.
fiber.create expects a function to run in the fiber and its arguments, while you are passing in
queue.run(pool), which executes
queue.run and tries to pass its result to