Pelles C forum

Pelles C => Add-ins => Topic started by: John Z on May 30, 2021, 03:52:09 PM

Title: Add-In details
Post by: John Z on May 30, 2021, 03:52:09 PM
Do Add-Ins run in their own threads? 

John Z
Title: Re: Add-In details
Post by: Grincheux on May 30, 2021, 09:16:19 PM
Thread or Process?


It can't be in a same thread but in the same process. I think.
Title: Re: Add-In details
Post by: John Z on May 30, 2021, 11:58:31 PM
I'm wondering if Add-In(s) run in their own thread using for example:
hThread = CreateThread(NULL,0,Show_Escape,NULL,NORMAL_PRIORITY_CLASS,&threadPtr);

I've minimized use of globals but knowing if they run in a thread opens up that possibility.

John Z
Title: Re: Add-In details
Post by: TimoVJL on May 31, 2021, 07:47:39 AM
Process Explorer shows only one thread id.


These Add-Ins create own thread:
https://forum.pellesc.de/index.php?topic=7845.msg29154#msg29154
https://forum.pellesc.de/index.php?topic=8107.msg29671#msg29671
Title: Re: Add-In details
Post by: John Z on May 31, 2021, 11:39:32 AM
Thanks very much TimoVJL.

I think that answers my question, well, unless so fast that the thread existence is not captured.  So best to keep Globals to a minimum..

John Z
Title: Re: Add-In details
Post by: Grincheux on May 31, 2021, 01:47:05 PM
As seen in WiW
Title: Re: Add-In details
Post by: John Z on May 31, 2021, 03:05:02 PM
Thanks!  Great example (and using your new tool too!)

Shows Pick Font using the same thread as poide - plenty of time to view as Pick Font is waiting user input.

 :) :) :)

John Z
Title: Re: Add-In details
Post by: John Z on May 31, 2021, 05:20:55 PM
Process Explorer shows only one thread id.


These Add-Ins create own thread:
https://forum.pellesc.de/index.php?topic=7845.msg29154#msg29154
https://forum.pellesc.de/index.php?topic=8107.msg29671#msg29671

SrcFileCC_WS_a1:
Great example code to do various things, like add buttons instead of menu items.



John Z