You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd suggest changing max_threads on the external engine api from 65536 to 65535
The max_threads parameter on the external_engines API methods takes a value 1..65536.
65536 is one more than the max of an unsigned 16 bit int, which means that max threads parameters in API wrappers need to use u32 rather than u16. While this isn't really a problem, it's one that might cause unexpected runtime errors in libraries built around the API.
More generically, if there are other places where counts like this are configured that align with type boundaries, it might be worthwhile choosing (2^8-1), (2^16-1), (2^32 -1) instead of those powers of 2.
I'd suggest changing max_threads on the external engine api from 65536 to 65535
The max_threads parameter on the external_engines API methods takes a value 1..65536.
65536 is one more than the max of an unsigned 16 bit int, which means that max threads parameters in API wrappers need to use u32 rather than u16. While this isn't really a problem, it's one that might cause unexpected runtime errors in libraries built around the API.
More generically, if there are other places where counts like this are configured that align with type boundaries, it might be worthwhile choosing (2^8-1), (2^16-1), (2^32 -1) instead of those powers of 2.
(Moved from lichess-org/lila#14014)
*yes the title is TFIC ;)
The text was updated successfully, but these errors were encountered: