Interactive Ink

What is the waitForIdle() method?


I want to know about editor.waitForIdle() method...

Is it necessary to get conversion result or to call editor.export_?

Can you explain the role of editor.waitForIdle()?

Please answer asap 


1 Comment

Dear Youngbae Kim,

`editor.waitForIdle()` will block until iink SDK has finished all the recognition background processing.

So you should use it if you want to be sure that everything in a given ContentPart was recognized, for example before calling `convert()` or `export_()`.

If you want to export intermediate results however, you can call `export_()` at any time - it may fail sometimes, but it is safe to ignore these exceptions. You can have a look at the SmartGuide in the UIRefImplementation an example.

Note that you should however only call `editor.waitForIdle()` from your own threads: never call it from a iink SDK listener, otherwise you will get a deadlock.

Bests regards


1 person likes this
Login or Signup to post a comment