[Tarantool-patches] [PATCH v2 3/3] fiber: keep reference to userdata if fiber created once
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Sep 5 18:07:07 MSK 2021
>> diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c
>> index 588b78504..39b67f940 100644
>> --- a/src/lib/core/fiber.c
>> +++ b/src/lib/core/fiber.c
>> @@ -32,6 +32,7 @@
>>
>> #include <trivia/config.h>
>> #include <trivia/util.h>
>> +#include <lauxlib.h>
>
> Totally agree with Vlad here. I guess you have two options:
> * Use the approach similar to <cord_on_yield>.
> * Introduce a constant in src/lib/core/fiber.h and add a static assert
> in src/lua/utils.h whether this value is the same as in LuaJIT.
>
> Maybe there are other options Vlad can suggest.
I have no better ideas. But among these 2 the one with a constant in
fiber.h and a static assert looks better. Less dependencies.
More information about the Tarantool-patches
mailing list