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> {
418
418
callee : C ,
419
419
}
420
420
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.
421
426
impl < C > LuaFiber < C >
422
427
where
423
428
C : LuaCallee ,
@@ -431,7 +436,6 @@ where
431
436
let Self { callee } = self ;
432
437
let fiber_ref = unsafe {
433
438
let l = ffi:: luaT_state ( ) ;
434
- // TODO don't require("fiber") everytime
435
439
lua:: lua_getglobal ( l, c_ptr ! ( "require" ) ) ;
436
440
lua:: lua_pushstring ( l, c_ptr ! ( "fiber" ) ) ;
437
441
if lua:: lua_pcall ( l, 1 , 1 , 0 ) == lua:: LUA_ERRRUN {
You can’t perform that action at this time.
0 commit comments