In my homework project I've been tasked to make something like a file explorer. I'm pretty much done, just doing some fine tuning. I have a search filter that scans the whole HDD and to make this faster I spawn 1 thread for each partition (on Unix I declare each partition a folder in "/"). I don't have much experience with threads, but spawning them in Python is really easy (I'm using a derived class from threading.Thread). Now I need to know when those threads are finished so I can "lock" search button so new threads won't spawn while searching is running.
3 replies to this topic
#1
Posted 25 January 2011 - 07:11 AM
A conclusion is where you got tired of thinking.
#define class struct // All is public.
|
|
|
#2
Posted 25 January 2011 - 09:52 AM
Very cool, and this is all written in python? Does it have a GUI or is it command line driven?
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
#3
Posted 25 January 2011 - 11:10 AM
Yea, all is written in Python and I've used Qt for GUI part.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#4
Posted 25 January 2011 - 12:41 PM
Correct me if I'm wrong, but does splitting the search function up into different threads really make it go faster?
If there were multiple processors and each thread was executed in sync on different processors, obviously the answer would be yes.
But if the processor was a single core/ single processor, only one thread is being executed at once, and splitting the program into different threads would only require more overhead for switching threads in the kernel.
Have you tried with and without multiple threads? I'm kinda curious as to which method is faster.
If there were multiple processors and each thread was executed in sync on different processors, obviously the answer would be yes.
But if the processor was a single core/ single processor, only one thread is being executed at once, and splitting the program into different threads would only require more overhead for switching threads in the kernel.
Have you tried with and without multiple threads? I'm kinda curious as to which method is faster.
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









