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
The class to do operations in Cocoa.

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.

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:

Some examples using this class:


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


NSOpenPanelMBS   -   NSOperationQueueMBS


The biggest plugin in space...