---
title: signal()
framework: dispatch
role: symbol
role_heading: Instance Method
path: dispatch/dispatchsemaphore/signal()
---

# signal()

Signals (increments) a semaphore.

## Declaration

```swift
@discardableResult func signal() -> Int
```

## Return Value

Return Value This function returns non-zero if a thread is woken. Otherwise, zero is returned.

## Discussion

Discussion Increment the counting semaphore. If the previous value was less than zero, this function wakes a thread currently waiting in dispatch_semaphore_wait.
