Cancelling libisofs write thread in case of early libburn end
This commit is contained in:
parent
98a60fec38
commit
db3c3553cb
@ -987,7 +987,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
int flag)
|
||||
{
|
||||
int ret, size, free_bytes, i, aborting= 0, emul, buffer_fill= 50, last_sector;
|
||||
int iso_wait_counter= 0, iso_cancel_limit= 5, iso_break_limit= 10;
|
||||
int iso_wait_counter= 0, iso_cancel_limit= 5, iso_break_limit= 20;
|
||||
int iso_cancelled= 0;
|
||||
struct burn_progress progress;
|
||||
char *status_text, date_text[80], *speed_unit, mem_text[8];
|
||||
@ -1032,17 +1032,20 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
*/
|
||||
if(image == NULL)
|
||||
break;
|
||||
if(!iso_image_generator_is_running(image)) {
|
||||
if(!iso_image_generator_is_running(image))
|
||||
break;
|
||||
} else if(iso_wait_counter > iso_cancel_limit && !iso_cancelled) {
|
||||
|
||||
/* >>> cancel image burn source */;
|
||||
|
||||
iso_wait_counter++;
|
||||
if(iso_wait_counter > iso_cancel_limit && !iso_cancelled) {
|
||||
isoburn_cancel_prepared_write(drive, NULL, 0);
|
||||
iso_cancelled= 1;
|
||||
} else if(iso_wait_counter > iso_break_limit) {
|
||||
|
||||
/* >>> This is dangerous. xorriso will free memory objects which might
|
||||
be in use in the unstoppable libisofs thread.
|
||||
/* >>> This can be dangerous. xorriso will free memory objects which
|
||||
might be in use in the unstoppable libisofs thread.
|
||||
The current implementation of ecma119.c:bs_cancel() seems to
|
||||
wait for the writer thread to end. Probably one should make
|
||||
this a part of the libisofs API specs and break the loop
|
||||
directly after isoburn_cancel_prepared_write().
|
||||
*/
|
||||
|
||||
break;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2010.10.19.170704"
|
||||
#define Xorriso_timestamP "2010.10.20.075221"
|
||||
|
Loading…
Reference in New Issue
Block a user