Module thread

Source
Expand description

Spawn-join functionality.

You may not need to check this if it is OK to run benchmarks with std::thread.

A key-value store is generally passive. However, some store may act like a server with active threads. In that case, one may employ its own implementation of spawn-join. If that is the case, their join handle (like std::thread::JoinHandle) should implement the JoinHandle trait and the spawn struct needs to implement Thread.

Note that for simplicity, the function spawn is generic over should not have a return value. So it is with the JoinHandle. Because the purpose is not general spawn-join but solely for benchmark code, which does not use any return values.

Structs§

DefaultJoinHandle
A wrapper for std::thread::JoinHandle.
DefaultThread
A zero-sized wrapper for std::thread functions.

Traits§

JoinHandle
A join handle returned by a spawn function.
Thread
A thread management abstraction.