-
Notifications
You must be signed in to change notification settings - Fork 0
MUI_Process
Process class simplifies the creation of subtasks to execute stuff in parallel to the rest of the application. Typically a process object is 'embedded' into a class instead of being subclassed. See Class4 demo for details.
Note: a subprocess must NOT invoke any method of any of the application's objects. All methods must be pushed onto the application's method stack by invoking MUIM_Application_PushMethod. Already pushed methods can be unpushed using MUIM_Application_UnpushMethod in case it might be possible that the pushed method may be executed after the destination object has been disposed.
Attribute | Version | ISG | Type |
---|---|---|---|
MUIA_Process_AutoLaunch | V20 | I.. | ULONG |
MUIA_Process_Name | V20 | I.. | ULONG |
MUIA_Process_Priority | V20 | I.. | ULONG |
MUIA_Process_SourceClass | V20 | I.. | ULONG |
MUIA_Process_SourceObject | V20 | I.. | ULONG |
MUIA_Process_StackSize | V20 | I.. | ULONG |
MUIA_Process_Task | V20 | ..G | ULONG |
Method | Version |
---|---|
MUIM_Process_Kill | V20 |
MUIM_Process_Launch | V20 |
MUIM_Process_Process | V20 |
MUIM_Process_Signal | V20 |
MUIA_Process_AutoLaunch -- V20 [I..], ULONG
, 0x80428855
If set to TRUE process loop is started right after the object instance is created.
Defaults to TRUE.
See supplied Process class example (Class4)
MUIA_Process_Name -- V20 [I..], ULONG
, 0x8042732b
Specifies a name for the process. The name will be copied. If no name is specified a suitable one will be generated automatically.
See supplied Process class example (Class4)
MUIA_Process_Priority -- V20 [I..], ULONG
, 0x80422a54
Specifies a priority for the process. Defaults to the same priority as the calling process and shouldn't be changed if not needed.
See supplied Process class example (Class4)
MUIA_Process_SourceClass -- V20 [I..], ULONG
, 0x8042cf8b
To make it possible to 'embedd' process class instance into custom class this attribute should point to the container class. MUIM_Process_Process method will be called using class given with this attribute and an object specified with MUIA_Process_SourceObject.
See supplied Process class example (Class4)
MUIA_Process_SourceObject -- V20 [I..], ULONG
, 0x804212a2
To make it possible to embed process class instance into a custom class this attribute should point to the container object. MUIM_Process_Process method will be called using class given with MUIA_Process_SourceClass and an object specified with MUIA_Process_SourceObject.
See supplied Process class example (Class4)
MUIA_Process_StackSize -- V20 [I..], ULONG
, 0x804230d0
Specifies a stack size for the new process. Defaults to 32K.
See supplied Process class example (Class4)
MUIA_Process_Task -- V20 [..G], ULONG
, 0x8042b123
Returns a pointer to the created process.
MUIM_Process_Kill -- V20, 0x804264cf
DoMethod(obj, MUIM_Process_Kill, LONG maxdelay);
Stops process' loop (MUIM_Process_Process). If the loop is not running does nothing.
LONG maxdelay
the maximum time in seconds to wait until the child task eventually
terminates
A boolean values which indicated whether killing the child task was successful or not.
See supplied Process class example (Class4)
MUIM_Process_Launch -- V20, 0x80425df7
DoMethod(obj, MUIM_Process_Launch);
Starts process' loop (MUIM_Process_Process). If the loop is already running does nothing.
See supplied Process class example (Class4)
MUIM_Process_Process -- V20, 0x804230aa
DoMethod(obj, MUIM_Process_Process, ULONG *kill, Object *proc);
Main process method. Terminating condition is passed in message struct. A proper implementation should wait for a signal to not use 100% cpu.
ULONG *kill
stay in the process' main loop as long as this variable is zero.
Object *proc
a pointer to the Process object itself.
See supplied Process class example (Class4)
MUIM_Process_Signal -- V20, 0x8042e791
DoMethod(obj, MUIM_Process_Signal, ULONG sigs);
Sends a signal mask to the created process.
ULONG sigs
a signal mask to send to the Process' child task.
See supplied Process class example (Class4)
Copyright © 1992-2006 by Stefan Stuntz Copyright © 2006-2021 by Thore Böckelmann, Jens Maus |
MUI for AmigaOS Homepage MUI for AmigaOS Wiki |
Updated: 11-Oct-2021 |