-1

a oneway method is asynchronous (the result is not immediately expected)[1]. oneway is used with the distributed objects API. [2]

But i found below code in SCPlugin

+ (oneway void) executeShellCommandAsynchronously:(NSString*)command
{
    [[self taskForShellCommand:command] launch];

    return;
}

+ (void) refreshAllFinderItems
{
    //code
    if (cmd) {
        [ShellTask executeShellCommandAsynchronously:cmd];
    }
}

will oneway behave same in cocoa application(without distributed object)?

Community
  • 1
  • 1
Parag Bafna
  • 22,812
  • 8
  • 71
  • 144

1 Answers1

2

Yes. Just because it isn't a part of the distributed objects API, does not mean it won't function in the same way. The keyword is a compiler hint, and not much else.

Parag Bafna
  • 22,812
  • 8
  • 71
  • 144
Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201