:orphan:
# PetscStreamType
Stream blocking mode, indicates how a stream implementation will interact with the default `NULL` stream, which is usually blocking. 
## Synopsis
```
#include <petscdevicetypes.h> 
typedef enum {
  PETSC_STREAM_GLOBAL_BLOCKING,
  PETSC_STREAM_DEFAULT_BLOCKING,
  PETSC_STREAM_GLOBAL_NONBLOCKING,
  PETSC_STREAM_MAX
} PetscStreamType;
```

## Values

- ***`PETSC_STREAM_GLOBAL_BLOCKING`    -*** Alias for `NULL` stream. Any stream of this type will block the host for all other streams to finish work before starting its operations.
- ***`PETSC_STREAM_DEFAULT_BLOCKING`   -*** Stream will act independent of other streams, but will still be blocked by actions on the `NULL` stream.
- ***`PETSC_STREAM_GLOBAL_NONBLOCKING` -*** Stream is truly asynchronous, and is blocked by nothing, not even the `NULL` stream.
- ***`PETSC_STREAM_MAX`                -*** Always 1 greater than the largest `PetscStreamType`, do not use





## See Also
 `PetscDeviceContextSetStreamType()`, `PetscDeviceContextGetStreamType()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscdevicetypes.h.html#PetscStreamType">include/petscdevicetypes.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdevicetypes.h)


[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)  
