Skip to content

n-api: thread safe functions#411

Merged
yorkie merged 7 commits intomasterfrom
n-api/tsfn
Nov 20, 2018
Merged

n-api: thread safe functions#411
yorkie merged 7 commits intomasterfrom
n-api/tsfn

Conversation

@legendecas
Copy link
Copy Markdown
Contributor

@legendecas legendecas commented Nov 9, 2018

  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added

Unit tests depends on #406.

Introduce thread safe functions into N-API. Simplify complex native add-ons to notify JavaScripts in a work thread without blocking work thread nor main thread.

@legendecas legendecas requested review from qile222 and yorkie November 9, 2018 12:17
@yorkie yorkie added the work-in-progress This PR is working in progress. label Nov 9, 2018
@yorkie yorkie changed the title [WIP] n-api: thread safe functions n-api: thread safe functions Nov 9, 2018
@yorkie
Copy link
Copy Markdown
Member

yorkie commented Nov 9, 2018

Let's remove the ugly prefix WIP on title and start using the label work-in-progress :)

@legendecas legendecas removed the work-in-progress This PR is working in progress. label Nov 19, 2018
@yorkie yorkie added the minor minor changes label Nov 19, 2018
Copy link
Copy Markdown
Member

@yorkie yorkie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like our first land on the N-API experimental functions, it's cool anyway, so I think the aspect of documenting should be reverse from the non-experimental, namely explicitly document experimental functions.

@@ -0,0 +1,208 @@
'use strict';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are this file a copy from https://github.com/Rokid/ShadowNode/blob/master/test/addons-napi/test_threadsafe_function/test.js? If yes, suggest that open an issue on nodejs/napi-test-suite to track how should we address this with N-API team.

@yorkie yorkie merged commit 3427407 into master Nov 20, 2018
@yorkie yorkie deleted the n-api/tsfn branch November 20, 2018 14:50
qile222 pushed a commit that referenced this pull request Dec 13, 2018
* master: (35 commits)
  https: client request doesn’t define default encoding (#440)
  n-api: data pointer was NULL on getting typed array info (#441)
  os: build bcast address interface. (#439)
  assert: better deepStrictEqual assertion (#435)
  working on v0.11.x (#434)
  process: memory leaks on recursive ticking (#433)
  uv, os: implement os.{get,set}Priority functions (#409)
  jerry: implement ES2015 class feature (part II.) (#428)
  test: fix wrong travis diff target introduced by #425 (#429)
  jerry: pass and enable jerry-test-suite (#425)
  n-api: ArrayBuffer/TypedArray support (#419)
  deps: upgrade the mbedtls to 2.13.0-apache (#384)
  jerry: rework jerry_parse function (#422)
  jerry: finalize hint of array buffers (#421)
  jerry: reduce the argument count of ecma_op_object_get_property_names (#424)
  n-api: update headers/test suites to LTS(10.13.0) (#416)
  jerry: Date.now shall return an integer (#418)
  n-api: thread safe functions (#411)
  util: IOTJS_ASSERT prints stack trace on macOS (#415)
  process: set immediate shall start an idle handle to activate uv_loop (#417)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor minor changes n-api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants