News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Add-In details

Started by John Z, May 30, 2021, 03:52:09 PM

Previous topic - Next topic

John Z

Do Add-Ins run in their own threads? 

John Z

Grincheux

Thread or Process?


It can't be in a same thread but in the same process. I think.

John Z

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

TimoVJL

#3
May the source be with you

John Z

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

Grincheux


John Z

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

John Z

Quote from: 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

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



John Z