A MulleInvocationQueue is fed with NSInvocations, which it then executes in serial fashion in a separate thread.
| Release Version | Release Notes | AI Documentation |
|---|---|---|
| RELEASENOTES | DeepWiki for MulleInvocationQueue |
You create a queue on your current thread
queue = [MulleInvocationQueue alloc];
queue = [queue initWithCapacity:128
configuration:MulleInvocationQueueMessageDelegateOnExecutionThread];
queue = [queue autorelease];Then you feed the invocation queue with invocations still from your thread. These invocations need not be to methods, written in a threadsafe manner, as long as the target is now exclusively used by the MulleInvocationQueue until all invocations are processed:
invocation = [NSInvocation mulleInvocationWithTarget:foo
selector:@selector( printUTF8String:), s];
[queue addInvocation:invocation];It is not necessary, but it will likely be helpful to mark the last invocation
as the "final" invocation. This could be a -close on a NSFilehandle for
example:
invocation = [NSInvocation mulleInvocationWithTarget:foo
selector:@selector( printUTF8String:), s];
[queue addFinalInvocation:invocation];With [queue start] the queue is now executing in parallel with the calling
thread.
| Requirement | Release Version | Description |
|---|---|---|
| MulleThread | ๐ MulleThread sleeps until nudged | |
| mulle-objc-list | ๐ Lists mulle-objc runtime information contained in executables. |
Use mulle-sde to add MulleInvocationQueue to your project:
mulle-sde add github:MulleFoundation/MulleInvocationQueueUse mulle-sde to build and install MulleInvocationQueue and all dependencies:
mulle-sde install --prefix /usr/local \
https://github.com/MulleFoundation/MulleInvocationQueue/archive/latest.tar.gzInstall the requirements:
| Requirements | Description |
|---|---|
| MulleThread | ๐ MulleThread sleeps until nudged |
| mulle-objc-list | ๐ Lists mulle-objc runtime information contained in executables. |
Download the latest tar or zip archive and unpack it.
Install MulleInvocationQueue into /usr/local with cmake:
PREFIX_DIR="/usr/local"
cmake -B build \
-DMULLE_SDK_PATH="${PREFIX_DIR}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}" \
-DCMAKE_PREFIX_PATH="${PREFIX_DIR}" \
-DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config ReleaseNat! for Mulle kybernetiK