From b42e9e9c80ff681fbb51b8e1cc111e7a63362a51 Mon Sep 17 00:00:00 2001 From: Jonas Seibert Date: Wed, 14 Feb 2018 21:37:34 +0100 Subject: [PATCH] Add note about konan.initRuntimeIfNeeded() (#1326) Initing the konan runtime is mandatory if your callback runs in a different thread (e.g. in a thread-per-connection model), that should be documented! --- INTEROP.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/INTEROP.md b/INTEROP.md index 6a15742e113..64816c2216c 100644 --- a/INTEROP.md +++ b/INTEROP.md @@ -370,6 +370,9 @@ Note that some function types are not supported currently. For example, it is not possible to get pointer to function that receives or returns structs by value. +If the callback doesn't run in the main thread it is mandatory to init the konan runtime +by calling `konan.initRuntimeIfNeeded()`. + #### Passing user data to callbacks #### Often C APIs allow passing some user data to callbacks. Such data is usually