[][src]Function mupdf_sys::fz_clone_context

pub unsafe extern "C" fn fz_clone_context(
    ctx: *mut fz_context
) -> *mut fz_context

Make a clone of an existing context.

This function is meant to be used in multi-threaded applications where each thread requires its own context, yet parts of the global state, for example caching, are shared.

ctx: Context obtained from fz_new_context to make a copy of. ctx must have had locks and lock/functions setup when created. The two contexts will share the memory allocator, resource store, locks and lock/unlock functions. They will each have their own exception stacks though.

May return NULL.