
On 11/25/2005 05:05 PM, simon meiklejohn wrote: [snip]
Deferral here means 1. Do something later 2. Let something else decide which thread will execute the work
[snip]
Its also handy where multiple entities in a program need to call into eachother, potentially recursively (A calls B calls A calls B) Better to break this recursion with queues of work items.
I'm guessing it could be used to demonstrate a multi-threaded program could deadlock. IOW, the different threads in a program could be "divided" into work_items which execute atomicly. Then by precisely specifying the order in which the work_items in different threads are executed, you demonstrate that the original program could deadlock. I remember doing something like this with signals, where each work_item, at the end of it's code, set a signal which the handler caught and then dispatched to the next work_item, or something like that.
So - any interest in more concrete code? More detailed explanations and scenarios?
Yes.