---
name: "drain_workqueue"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/drain_workqueue"
---

# drain\_workqueue(9)

drain a workqueue

## NAME

drain\_workqueue - drain a workqueue

## SYNOPSIS

**void drain\_workqueue(struct workqueue\_struct \*** *wq***);**

## ARGUMENTS

*wq*

workqueue to drain

## DESCRIPTION

Wait until the workqueue becomes empty. While draining is in progress, only chain queueing is allowed. IOW, only currently pending or running work items on *wq* can queue further work items on it. *wq* is flushed repeatedly until it becomes empty. The number of flushing is detemined by the depth of chaining and should be relatively short. Whine if it takes too long.

## COPYRIGHT
