File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,11 @@ pub struct LuaFiber<C> {
418418 callee : C ,
419419}
420420
421+ /// Deferred non-yielding fiber implemented using **lua** api. This (hopefully)
422+ /// temporary implementation is a workaround. Tarantool C API lacks the method
423+ /// for passing the necessary information into the underlying `struct fiber`
424+ /// reliably. In this case we need to be able to set the `void *f_arg` field to
425+ /// be able to implement correct deferred fibers which don't yield.
421426impl < C > LuaFiber < C >
422427where
423428 C : LuaCallee ,
@@ -431,7 +436,6 @@ where
431436 let Self { callee } = self ;
432437 let fiber_ref = unsafe {
433438 let l = ffi:: luaT_state ( ) ;
434- // TODO don't require("fiber") everytime
435439 lua:: lua_getglobal ( l, c_ptr ! ( "require" ) ) ;
436440 lua:: lua_pushstring ( l, c_ptr ! ( "fiber" ) ) ;
437441 if lua:: lua_pcall ( l, 1 , 1 , 0 ) == lua:: LUA_ERRRUN {
You can’t perform that action at this time.
0 commit comments