mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat(ext/ffi): Callbacks (#14663)
This commit adds support for unstable FFI callbacks. A callback is registered using the `Deno.UnsafeCallback` API. The backing memory for the callback can be disposed of using `Deno.UnsafeCallback#close`. It is not safe to pass the callback after calling close. Callbacks from other than the isolate thread are not supported. Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Bert Belder <bertbelder@gmail.com>
This commit is contained in:
parent
60869c2598
commit
3d6fa64f19
22 changed files with 2351 additions and 508 deletions
|
@ -139,6 +139,7 @@
|
|||
createHttpClient: __bootstrap.fetch.createHttpClient,
|
||||
http: __bootstrap.http,
|
||||
dlopen: __bootstrap.ffi.dlopen,
|
||||
UnsafeCallback: __bootstrap.ffi.UnsafeCallback,
|
||||
UnsafePointer: __bootstrap.ffi.UnsafePointer,
|
||||
UnsafePointerView: __bootstrap.ffi.UnsafePointerView,
|
||||
UnsafeFnPointer: __bootstrap.ffi.UnsafeFnPointer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue