# wasm: implement \`@fence\` · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0e3303ccd9985f4336ccde779b2f1b90f130d7a2)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0e3303ccd9985f4336ccde779b2f1b90f130d7a2

Requested commit: 0e3303ccd9985f4336ccde779b2f1b90f130d7a2

Commit: 0e3303ccd9985f4336ccde779b2f1b90f130d7a2

Tree: e7d7b2b23b7ec892a28c9c91cda2e3efc0024f54

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: implement `@fence`

Uses the `atomic.fence` instruction for multi-thread-enabled builds
where the `atomics` feature is enabled for the wasm32 target.
In all other cases, this lowers to a nop.

```

## Parents

- [b19c258f045aa1653b4e38ba2ff96302d914eea2](https://git.cafe/gitcafe/zig/commit/b19c258f045aa1653b4e38ba2ff96302d914eea2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0e3303ccd9985f4336ccde779b2f1b90f130d7a2?format=markdown)
