Talk:Concurrent computing: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
Line 5: Line 5:
:::Random is what I wanted. The Ada example I provided creates three separate tasks. Each one calculates a random number between 0.0 and 1.0. The task then delays the number of seconds corresponding to that random number. A delay of 0.5 lasts 0.5 seconds. There are two goals to "Simple concurrent actions". Those goals are to demonstrate the syntax for defining concurrent behavior within a single program, and the syntax for creating a random sleep or delay. --[[User:Waldorf|Waldorf]] 17:59, 7 February 2007 (MST)
:::Random is what I wanted. The Ada example I provided creates three separate tasks. Each one calculates a random number between 0.0 and 1.0. The task then delays the number of seconds corresponding to that random number. A delay of 0.5 lasts 0.5 seconds. There are two goals to "Simple concurrent actions". Those goals are to demonstrate the syntax for defining concurrent behavior within a single program, and the syntax for creating a random sleep or delay. --[[User:Waldorf|Waldorf]] 17:59, 7 February 2007 (MST)
::::I see. You might want to explain that in the task; I thought the task's purpose was simply to demonstrate forking. --[[User:Short Circuit|Short Circuit]] 20:33, 7 February 2007 (EST)
::::I see. You might want to explain that in the task; I thought the task's purpose was simply to demonstrate forking. --[[User:Short Circuit|Short Circuit]] 20:33, 7 February 2007 (EST)
:::::What do you need to be clarified? I specified threads, tasks or co-routines. It can be argued that forking is a form of concurrency, which is why I specified threads, etc. Please let me know how you would like the task description to be clearer. There is currently a separate task to demonstrate forking. I have plans to explore more aspects of concurrency with tasks synchronous and asynchonous communicatin between threads, etc. --[[User:Waldorf|Waldorf]] 19:27, 7 February, 2007 (MST)

Revision as of 02:29, 8 February 2007

Random order?

Is random order what is meant here, or is "any order" sufficient? --Short Circuit 00:16, 6 February 2007 (EST)

Random order means that the order of output is not determined at compile time. The order of output may differ from one execution of the program to another due to differences in timing between the concurrent units providing the output. --Waldorf 11:47, 7 February 2007 (MST)
"Undetermined" might be the more appropriate word. At least one of the programming examples attempts to enforce random behavior. --Short Circuit 14:17, 7 February 2007 (EST)
Random is what I wanted. The Ada example I provided creates three separate tasks. Each one calculates a random number between 0.0 and 1.0. The task then delays the number of seconds corresponding to that random number. A delay of 0.5 lasts 0.5 seconds. There are two goals to "Simple concurrent actions". Those goals are to demonstrate the syntax for defining concurrent behavior within a single program, and the syntax for creating a random sleep or delay. --Waldorf 17:59, 7 February 2007 (MST)
I see. You might want to explain that in the task; I thought the task's purpose was simply to demonstrate forking. --Short Circuit 20:33, 7 February 2007 (EST)
What do you need to be clarified? I specified threads, tasks or co-routines. It can be argued that forking is a form of concurrency, which is why I specified threads, etc. Please let me know how you would like the task description to be clearer. There is currently a separate task to demonstrate forking. I have plans to explore more aspects of concurrency with tasks synchronous and asynchonous communicatin between threads, etc. --Waldorf 19:27, 7 February, 2007 (MST)