Skip to content

Commit 18b306e

Browse files
committed
feat(node_api): Add missing functions
feat(js_native_api): Add missing functions
1 parent 7ae2cc3 commit 18b306e

File tree

8 files changed

+1028
-5
lines changed

8 files changed

+1028
-5
lines changed

js/promise.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ func (p *Promise) ensurePending() {
102102
}
103103

104104
func (p *Promise) settle() {
105-
st := napi.CallThreadsafeFunction(p.ThreadsafeFunction)
105+
st := napi.CallThreadsafeFunction(p.ThreadsafeFunction, napi.Blocking)
106106
if st != napi.StatusOK {
107107
panic(napi.StatusError(st))
108108
}
109109
}
110110

111111
func (p *Promise) release() {
112-
st := napi.ReleaseThreadsafeFunction(p.ThreadsafeFunction)
112+
st := napi.ReleaseThreadsafeFunction(p.ThreadsafeFunction, napi.Release)
113113
if st == napi.StatusClosing {
114114
p.ThreadsafeFunction = nil
115115
} else if st != napi.StatusOK {

0 commit comments

Comments
 (0)