Module utils

Module utils 

Source

Structs§

SpinWait
SpinWait struct is used wherever atomics are used to control resource access over a normal locking approach. This usually comes into play whenever a compare_exchange or other function is being called. As best practice, it is strongly recommended that the spin loop is terminated after a finite amount of iterations and an appropriate blocking syscall is made. This function achieves that. SpinWait is designed to enable spin looping in a responsible manner

Functions§

lower_leg_values_outside_central_interval
Return values outside the central prob interval (e.g. prob=0.90 for 90% central interval) For a normal curve the two-sided z for central prob = inverse_cdf((1+prob)/2). Here we precompute z for prob = 0.90: z ≈ 1.6448536269514722.
max_threads
normal_curve_z_value