:orphan:
# PetscDeviceContextQueryIdle
Returns whether or not a `PetscDeviceContext` is idle 
## Synopsis
```
#include <petscdevice.h> 
PetscErrorCode PetscDeviceContextQueryIdle(PetscDeviceContext dctx, PetscBool *idle)
```
Not Collective


## Input Parameter

- ***dctx -*** The `PetscDeviceContext`



## Output Parameter

- ***idle -*** `PETSC_TRUE` if `dctx` has NO work, `PETSC_FALSE` if it has work





## Note
This routine only refers a singular context and does NOT take any of its children into
account. That is, if `dctx` is idle but has dependents who do have work this routine still
returns `PETSC_TRUE`.


## See Also
 `PetscDeviceContextCreate()`, `PetscDeviceContextWaitForContext()`, `PetscDeviceContextFork()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/device/interface/dcontext.cxx.html#PetscDeviceContextQueryIdle">src/sys/objects/device/interface/dcontext.cxx</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/device/interface/dcontext.cxx)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
