Skip to content

Commit ecb8d06

Browse files
committed
docs: Document Process.runOnThread()
1 parent 23e8e61 commit ecb8d06

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

_i18n/en/_docs/javascript-api.md

+10
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,16 @@ Clone **[this repo](https://github.com/oleavr/frida-agent-example)** to get star
265265

266266
Returns an observer object that you can call `detach()` on.
267267

268+
+ `Process.runOnThread(id, callback)`: runs the JavaScript function `callback`
269+
without any arguments, on the thread specified by `id`. Returns a *Promise*
270+
that receives the value returned by your callback.
271+
272+
Must be used with extreme caution due to the thread potentially being
273+
interrupted in non-reentrant code. For example, you could be interrupting it
274+
while it's in the middle of some delicate code, holding a specific
275+
non-recursive lock, which you then try to implicitly acquire again when you
276+
call some function.
277+
268278
+ `Process.findModuleByAddress(address)`,
269279
`Process.getModuleByAddress(address)`,
270280
`Process.findModuleByName(name)`,

0 commit comments

Comments
 (0)