isCancelled method
Check if the cancel flag is set.
Returns true if cancelled, false if not, or throws if handle invalid.
Implementation
@override
bool isCancelled(int handle) {
if (handle == 0) return false;
final result = ffi_native.monty_is_cancelled(
Pointer<ffi_native.MontyHandle>.fromAddress(handle),
);
return result == 1;
}