Platforms to show: All Mac Windows Linux Cross-Platform
NSOperationMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Threading | MBS MacFrameworks Plugin | 8.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Requires Mac OS X 10.5.
The NSOperation class manages the execution of a single encapsulated task. Operations are typically scheduled by adding them to an operation queue object (an instance of the NSOperationQueue class), although you can also execute them directly by explicitly invoking their start method.
Operation objects are single-shot objects, that is, they perform their task once. You cannot reuse the same NSOperation object to perform a task (or a slight variant of the task) multiple times in succession. Attempting to execute an operation that has already finished results in an exception.
When manually executing operations, you are responsible for making sure the object is ready to execute. Starting an operation that is not in the ready state generally results in an exception being thrown. If you use an operation queue to manage the execution, the NSOperationQueue object ensures that the operation is executed only when it is ready.
- 4 events
- 3 properties
- property Handle as Integer
- property queuePriority as Integer
- property threadPriority as Double
- 18 methods
- method addDependency(op as NSOperationMBS)
- method cancel
- method Constructor
- method Constructor(Handle as Integer)
- method dependencies as NSOperationMBS()
- method dependenciesCount as Integer
- method dependency(index as Integer) as NSOperationMBS
- method isCancelled as boolean
- method isConcurrent as boolean
- method isExecuting as boolean
- method isFinished as boolean
- method isReady as boolean
- method Lock
- method main
- method removeDependency(op as NSOperationMBS)
- method start
- method Unlock
- method waitUntilFinished
- 5 constants
Constants
Constant | Value | Description |
---|---|---|
NSOperationQueuePriorityHigh | 4 |
One of the constants for the priority property.
Operations receive high priority for execution. |
NSOperationQueuePriorityLow | -4 |
One of the constants for the priority property.
Operations receive low priority for execution. |
NSOperationQueuePriorityNormal | 0 |
One of the constants for the priority property.
Operations receive the normal priority for execution. |
NSOperationQueuePriorityVeryHigh | 8 |
One of the constants for the priority property.
Operations receive very high priority for execution. |
NSOperationQueuePriorityVeryLow | -8 |
One of the constants for the priority property.
Operations receive very low priority for execution. |
This class has no sub classes.
Some methods using this class:
- NSOperationQueueMBS.addOperation(op as NSOperationMBS)
- NSOperationQueueMBS.addOperations(ops() as NSOperationMBS, wait as boolean)
- NSOperationQueueMBS.operation(index as UInt32) as NSOperationMBS
- NSOperationQueueMBS.operations as NSOperationMBS()
Some examples using this class:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
NSOpenPanelMBS - NSOperationQueueMBS