-3

I'm converting one of my project from Objective C to swift. I was handling main queue synchronously without deadlock using following code

void runOnMainQueueWithoutDeadlocking(void (^block)(void))

How can I convert this method definition to swift. I'm new to swift, please help

Thanks in advance

Ankita Shah
  • 2,178
  • 3
  • 25
  • 42

1 Answers1

1

The method definition is easy to convert:

func runOnMainQueueWithoutDeadlocking(block:()->()) {
    // ...
}

You could easily have found that out simply by looking at the "generated interface" for this method.

What the method actually does, however, I have no idea (because you have not shown it).

matt
  • 515,959
  • 87
  • 875
  • 1,141