Simplified the scaffold progress tracking by removing complex thread spawning, atomic counters, and separate progress meters. Replaced with a simple logging message.
- Deadlock risk: Complex thread synchronization with atomic counters
- Overhead: Separate monitoring thread checking progress every 10ms
- Complexity: Multiple shared pointers, atomic operations, and memory ordering
- Unnecessary: Scaffold filtering is typically fast enough not to need detailed progress
- Removed: Thread spawning for scaffold progress monitoring
- Removed: Atomic counters (
scaffold_total_work,scaffold_completed_work) - Removed: Separate progress meter for scaffolding
- Added: Simple log message:
[wfmash::mashmap] Scaffolding mappings...
- Modified:
filterByScaffoldsfunction signature to make progress tracking parameters optional with default nullptr - Removed: All
fetch_addcalls to update scaffold work counters - Removed: Progress tracking from the parallel distance computation
- No deadlock risk: No threads or synchronization needed
- Simpler code: Easier to maintain and debug
- Same functionality: Scaffold filtering still works exactly the same
- Better performance: No overhead from progress tracking
Confirmed that:
- Program compiles successfully
- Scaffold filtering still works (
--scaffold-outproduces output) - No deadlocks or hangs
- Simple message "Scaffolding mappings..." is displayed
[wfmash::mashmap] mapping [100.0% complete, 4029392/4029392 units, 0s elapsed]
[wfmash::mashmap] mapping completed.
[wfmash::mashmap] Scaffolding mappings...
[wfmash::mashmap] Mapped query in 0.4s, results saved to: /dev/stdout