Module quickjs_runtime::jsutils::promises
source · Functions§
- create a new promise with a producer and a mapper the producer will run in a helper thread(in the tokio thread pool) and thus get a result asynchronously the resulting value will then be mapped to a JSValueRef by the mapper in the EventQueue thread the promise which was returned is then resolved with the value which is returned by the mapper