Main Site Documentation

Threads


#1

How many threads can be run simultaneously on a FEZ Domino board? and are there performances issues if to many threads are active? processor time is shared, so does it slow down a lot?


#2

You can run as many threads as you like till you run out of memory.


#3

Depends on what threads are doing. Say you have 2 threads running in a loop. Each thread will get 20ms time. So basically both get half the processor time (minus the cost of any system keeping). So each thread can only do half the work. Moreover, their is a tax for thread switch overhead. So on net, on a single proc machine, threads cost. The real value of threads is seperate logical workflow. So you can have 1 blocking on a read and maybe your main thread doing something else. The blocking thread(s) don’t get time, so almost no cpu cost. Just the cost of walking the thread list and some other tests. Just depends on what your doing. Generally, if don’t need a thread, try to work around adding them if possible.