v0.2.4: stop export loop on Ctrl+C instead of flooding failures
- Add IsCancelled() to Bridge interface - Check bridge.IsCancelled() before each export in serial/parallel/backupTree - Parallel workers mark remaining slots as 'cancelled' instead of exporting - Add photos_request_is_cancelled to ObjC and C stub
This commit is contained in:
@@ -28,6 +28,8 @@ char *photos_list_tree_json(void);
|
||||
|
||||
void photos_request_cancel(void);
|
||||
|
||||
int photos_request_is_cancelled(void);
|
||||
|
||||
void photos_free_string(char *value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -415,3 +415,7 @@ void photos_free_string(char *value) {
|
||||
void photos_request_cancel(void) {
|
||||
photos_cancelled = 1;
|
||||
}
|
||||
|
||||
int photos_request_is_cancelled(void) {
|
||||
return photos_cancelled;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,10 @@ void photos_request_cancel(void) {
|
||||
stub_cancelled = 1;
|
||||
}
|
||||
|
||||
int photos_request_is_cancelled(void) {
|
||||
return stub_cancelled;
|
||||
}
|
||||
|
||||
void photos_test_set_export_preview_json(const char *json) {
|
||||
stub_export_preview_json = json;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user