# @smake/queue

> Typescript Module Template

Latest version **2.3.0** (published 2023-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @smake/queue
pnpm add @smake/queue
yarn add @smake/queue
bun add @smake/queue
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2023-09-12 |
| First published | 2021-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 1 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yu Chen |
| Maintainers | kuyoonjo |
| Keywords | typescript, generator, node, module, javascript, js |

## Links

- npm: https://www.npmjs.com/package/@smake/queue
- Repository: https://github.com/kuyoonjo/smake-lib-queue
- Homepage: https://github.com/kuyoonjo/smake-lib-queue#readme
- Issues: https://github.com/kuyoonjo/smake-lib-queue/issues
- npm.io page: https://npm.io/package/@smake/queue

## Dependencies (1)

- [@smake/llvm](https://npm.io/package/@smake/llvm.md) ^1.1.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.3.0 (latest) — 2023-09-12
- 2.2.0 — 2023-09-12
- 2.1.0 — 2023-03-06
- 2.0.0 — 2021-11-16
- 1.0.1 — 2021-11-08
- 1.0.0 — 2021-08-10

## README

# C++ Queue Library
```c++

namespace ex {
class safe_queue; // 线程安全队列
} // namespace ex
```
```c++
#include <chrono>
#include <ex/safe_queue.h>
#include <iostream>
#include <string>
#include <thread>

using namespace std::chrono_literals;

ex::safe_queue<std::string> q;

int main() {
  std::thread t1([]() {
    while (true) {
      std::this_thread::sleep_for(1s);
      q.enqueue("I will kill you!");
    }
  });

  std::thread t2([]() {
    while (true) {
      auto msg = q.dequeue();
      std::cout << msg << std::endl;
    }
  });

  t1.join();
  t2.join();
  return 0;
}
```

---
_Source: https://npm.io/package/@smake/queue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
