[][src]Function smartpool::scoped::scoped

pub unsafe fn scoped<'env, R>(
    operation: impl FnOnce(&Scope<'env>) -> R
) -> R

Enter a batch of scoped operations, which allows non-static futures (which reference the stack frame) to be submitted to a threadpool in a memory-safe way, by preventing the calling stack frame from exiting until all futures in this scoped batch are completed.