CreateIpcQueue Questions
Posted: Tue Jul 06, 2021 7:14 am
Is the documentation for the CreateIpcQueue API outdated? Specifically for maxThreadCount, from my testing it never generated more than the default 16 threads when using the default, but the documentation says that or only support 1 or unlimited.
Also, are the threads dynamically created as need? and are they destroyed again when they are no longer needed? In other words, is the thread pool dynamic.
Thanks!
Also, are the threads dynamically created as need? and are they destroyed again when they are no longer needed? In other words, is the thread pool dynamic.
Thanks!
Code: Select all
// Create an ipc queue.
// Please choose a unique ipc name to avoid conflicts with other programs.
// Only one ipc queue with the same name can be open at the same time.
// So if 2 programs try to create the same ipc queue, the second call will fail.
// You can specify how many threads may be created to handle incoming messages.
// If the order of the messages is crucial for you, set "maxThreadCount" to "1".
// In its current implementation "maxThreadCount" only supports "1" or unlimited.
// The parameter "maxQueueLen" is not yet implemented at all.
// The "context" is a simple pointer value that is forwarded to your callback.
function CreateIpcQueue (ipc : pchar;
callback : TIpcCallback;
context : pointer = nil;
maxThreadCount : dword = 16;
maxQueueLen : dword = $1000) : bool; stdcall;