4 releases

0.1.5 Aug 17, 2024
0.1.4 Jul 26, 2024
0.1.3 Jul 24, 2024
0.1.2 Jul 24, 2024

#9 in #pos

Download history 374/week @ 2024-07-22 24/week @ 2024-07-29 132/week @ 2024-08-12 18/week @ 2024-08-19 8/week @ 2024-08-26

158 downloads per month
Used in aiapi

MulanPSL-2.0

5KB

pos_next

一个不同线程之间可以共享的 pos , 用了不安全代码, 不保证数字的连续性

use aok::{Result, OK};
use pos_next::PosNext;
use static_init::constructor;
use tracing::info;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[test]
fn test() -> Result<()> {
  let p = PosNext::new();
  info!("{}", p.next());
  info!("{}", p.next());
  info!("{}", p.next());
  info!("{}", p.next());
  OK
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Dependencies

~315KB