温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/bun/ffi/FFIFunction/threadsafe
点击访问原文链接

property threadsafe | bun:ffi module | Bun

property threadsafe | bun:ffi module | BunBuildDocsReferenceGuidesBlogDiscord/bun:ffi/FFIFunction/threadsafePthreadsafe

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/bun:ffi/FFIFunction/threadsafePthreadsafe

property

ffi.FFIFunction.threadsafereadonly threadsafe?: booleanCan C/FFI code call this function from a separate thread?

Only supported with JSCallback.

This does not make the function run in a separate thread. It is still up to the application/library to run their code in a separate thread.

By default, JSCallback calls are not thread-safe. Turning this on incurs a small performance penalty for every function call. That small performance penalty needs to be less than the performance gain from running the function in a separate thread.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录