Unreliable waiting?
V3032 Waiting on this expression is unreliable, as compiler may optimize some of the variables. Use volatile variable(s) or synchronization primitives to avoid this. WhileContext.cs 212
private (LoopVar<TItem>, Tensor[]) _BuildLoop<TItem>( .... ) where .... { .... // Finds the closest enclosing non-None control pivot. var outer_context = _outer_context; object control_pivot = null; while (outer_context != null && control_pivot == null) { } if (control_pivot != null) { } .... }
The analyzer indicates that such an implementation of waiting can be optimized by the compiler, but I doubt that authors really tried to implement waiting here – most likely, the code is simply not written up to the end and is planned to be finalized in the future. It might be worth throwing the NotImplementedException here, given that this practice is used elsewhere in the project. Anyway, in my opinion, an explanatory comment would come in handy.
Please click here to see more bugs from this project.