Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Windows Threading problem

New Here ,
Apr 01, 2008 Apr 01, 2008
hi,
I'm try to use windows thread to send a http request on a asynchron mode but it looks that Indesign don't support multi-threading,
i have used CIdleTask and CIdleTaskThread but in processing the request Indsign interface an menu looks to be disabled untill request finish so here i think that threading if it works it will not be on background,
when i use the windows threads ,an assert dialog is showed "QueryInterface use thread not safe !"
please have someone a solution ??
thanks in advance
TOPICS
SDK
807
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 01, 2008 Apr 01, 2008
Do not call InDesign methods from your separate thread.
Set a completion flag when done and watch that flag from your idle task.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 08, 2010 Jun 08, 2010

Hi,

I have to perform the same task of posting data using http request and I want to do this activity on different thread. For this I have created a new thread using windows API's but I am also getting the same assert "QueryInterface not thread safe" while executing the thread.

I am not able to figure out how to resolve this. Is it possibel to do multithreading in CS3/CS4.

Can you guys elaborate more how to acheive multithreading in InDesign.

Thanks in advance.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jun 08, 2010 Jun 08, 2010
LATEST

You have to maintain a private queue, without using any InDesign classes.

The thread feeds the queue, and the idle task within InDesign's main thread polls it.

Dirk

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines