5 #include "condition.inc"
6 #include "indexfile.inc"
11 // Runs in a loop, creating new index files as needed
13 class MainIndexes
: public Thread
16 MainIndexes(MWindow
*mwindow
);
19 void add_next_asset(Asset
*asset
);
25 void interrupt_build();
26 void load_next_assets();
27 void delete_current_assets();
29 ArrayList
<Asset
*> current_assets
;
30 ArrayList
<Asset
*> next_assets
;
32 int interrupt_flag
; // Build process interrupted by user
33 int done
; // Program quit
35 Condition
*input_lock
; // Lock until new data is to be indexed
36 Mutex
*next_lock
; // Lock changes to next assets
37 Condition
*interrupt_lock
; // Force blocking until thread is finished