5 releases

new 0.1.6 Jan 16, 2025
0.1.5 Aug 17, 2024
0.1.4 Jul 26, 2024
0.1.3 Jul 24, 2024
0.1.2 Jul 24, 2024

#11 in #pos

Download history 9/week @ 2024-09-29 1/week @ 2024-10-06 13/week @ 2024-10-27 3/week @ 2024-11-03 7/week @ 2024-12-08 1/week @ 2024-12-15 93/week @ 2025-01-12

93 downloads per month
Used in aiapi

MulanPSL-2.0

7KB

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