![]() |
#1 |
Junior Member
Join Date: Apr 2011
Posts: 5
|
Multithreaded transcoding
Due to some stupid Winamp bugs, I have to re-transcode and transfer my entire library to my ipod. The estimate on time remaining is 6.5 hours because it's using the simple approach of one track at a time. I would love it if you could use all my CPUs. I'll even give you the algorithm (in Perlish pseudocode)!
@no_transcode = grep { !need_transcode($_) } @tracks_to_transfer; @transcode = grep { need_transcode($_) } @tracks_to_transfer; transfer($_) for @no_transcode; # Start NCPUS threads that all repeatedly pull a track off the shared queue and send it to transfer() async_workers(NCPUS, shared_queue(@transcode), transfer); That's how I'd do it with threads anyway. edit one more note: course-grained parallelism is SO EASY please do it ![]() |
![]() |
![]() |
![]() |
|
Tags |
concurrency, ipod, multithreading, transcode |
Thread Tools | Search this Thread |
Display Modes | |
|
|