[Tarantool-patches] [PATCH v2 2/2] fiber: fiber_join -- don't crash on misuse

Cyrill Gorcunov gorcunov at gmail.com
Wed Apr 28 18:21:11 MSK 2021


On Wed, Apr 28, 2021 at 06:13:30PM +0300, Serge Petrenko wrote:
> Hi! Thanks for the patch!
> Please find 2 comments below.

Thanks! I've force pushed an update.
---
 test/app/fiber.result   | 2 +-
 test/app/fiber.test.lua | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/app/fiber.result b/test/app/fiber.result
index d3a245428..b145302aa 100644
--- a/test/app/fiber.result
+++ b/test/app/fiber.result
@@ -1154,7 +1154,7 @@ end, 10);
 ch1 = fiber.channel(1);
 ---
 ...
-f = fiber.new(function() while ch1:is_empty() do fiber.sleep(0) end end);
+f = fiber.new(function() ch1:get() end);
 ---
 ...
 f:set_joinable(false);
diff --git a/test/app/fiber.test.lua b/test/app/fiber.test.lua
index 430e4ae96..9f25f7f9c 100644
--- a/test/app/fiber.test.lua
+++ b/test/app/fiber.test.lua
@@ -488,7 +488,7 @@ end, 10);
 
 -- gh-6046: make sure non joinable fiber fails
 ch1 = fiber.channel(1);
-f = fiber.new(function() while ch1:is_empty() do fiber.sleep(0) end end);
+f = fiber.new(function() ch1:get() end);
 f:set_joinable(false);
 _, errmsg = pcall(f.join, f);
 errmsg;
-- 
2.30.2



More information about the Tarantool-patches mailing list