Skip to content
Snippets Groups Projects
  • Vladislav Shpilevoy's avatar
    8443bd93
    fiber: introduce schedule_task() internal function · 8443bd93
    Vladislav Shpilevoy authored
    fiber._internal.schedule_task() is an API for a singleton fiber
    worker object. It serves for not urgent delayed execution of
    functions. Main purpose - schedule execution of a function, which
    is going to yield, from a context, where a yield is not allowed.
    Such as an FFI object's GC callback.
    
    It will be used by SWIM and by fio, whose destruction yields, but
    they need to use GC finalizer, where a yield is not allowed.
    
    Part of #4727
    8443bd93
    History
    fiber: introduce schedule_task() internal function
    Vladislav Shpilevoy authored
    fiber._internal.schedule_task() is an API for a singleton fiber
    worker object. It serves for not urgent delayed execution of
    functions. Main purpose - schedule execution of a function, which
    is going to yield, from a context, where a yield is not allowed.
    Such as an FFI object's GC callback.
    
    It will be used by SWIM and by fio, whose destruction yields, but
    they need to use GC finalizer, where a yield is not allowed.
    
    Part of #4727