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

Serge Petrenko sergepetrenko at tarantool.org
Wed Apr 28 18:34:44 MSK 2021



28.04.2021 18:21, Cyrill Gorcunov пишет:
> 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;
Thanks! LGTM.

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list