39
votes
Programming language where every function call/block is done in a separate thread?
every function call/new block (if clauses, loops etc) will work in a separate thread.
Read a lot more about continuations and continuation-passing style (and their relation to threads or coroutines) ...
37
votes
Programming language where every function call/block is done in a separate thread?
You may be interested in reading about the research into data parallel Haskell. If you search around on youtube, Simon Peyton Jones has given some interesting talks related to the subject as well.
...
15
votes
Programming language where every function call/block is done in a separate thread?
This is exactly what Erlang does. It handles rejoining the threads mostly by using queues. It`s a brilliant concept but a bit difficult to wrap your head around initially if your background is more ...
12
votes
Accepted
Immediately awaiting an asynchronous call
I think you misunderstand the await call. What async and await do is allow the thread you are executing on (not just the main thread) to continue working. The mechanism that supports this is called ...
10
votes
How do I know if a set of code is a good candidate for parallelization?
You know code is a good candidate for parallelization when it can be broken into a set of "discrete" (i.e. independent) tasks. A discrete task is one that produces a specific result and has no side ...
8
votes
How Functional Programming addresses concurrent increment/decrement operations invoked by different users?
You are asking how functional languages handles shared mutable state. Functional languages do prefer and encourage immutable data structures, but they all (AFAIK) have provisions for mutable shared ...
6
votes
Workflow for designing a parallel architecture
I suppose this could be application-specific? I.e., some codes written in serial may need to be significantly modified in order to be parallelized?
This, very much.
In fact, I would say that it's ...
5
votes
Accepted
Design for avoiding concurrent calls to an interface implementation
First, I would create a decorator / wrapper that synchronizes calls, instead of putting it into implementation.
And I would implement it using queue instead of using a lock. TaskQueue from this other ...
5
votes
Parallel sorting algorithm that compares all elements
If the comparison metric is a boolean (as indicated in the comments), then there are two possibilities.
The metric is transitive (if comp(A, B) yields true and comp(B, C) yields true, then comp(A, C) ...
5
votes
Alternating between Java streams and parallel streams at runtime
You can define a custom thread pool by implementing the (Executor) interface that increases or decreases the number of threads in the pool as needed. You can submit your parallelStream chain to it as ...
5
votes
Accepted
How to approach a large number of multiple, parallel HttpClient requests?
The first rule when talking about performance is to measure. The built in tools in visual studio is fairly competent, and in a pinch, adding a stopwatch or two can help reveal what part of the code is ...
4
votes
Programming language where every function call/block is done in a separate thread?
Similar projects have been attempted in the past. I suggest reading up on the classics to loot ideas. (All links go to Wikipedia)
Unity
This language was/is used to teach parallel programming. I don'...
4
votes
Programming language where every function call/block is done in a separate thread?
First I would recommend you look at PROMELA, a language used for describing a concurrent algorithm so that a model checker can brute force all possible executions to verify it is incapable of ...
4
votes
How can I improve the speed of scanning multiple directories recursively at the same?
First thing to understand is that threading is a form of parallelism. The differences between separate threads and separate processes are not all that important in this case.
As you write yourself, ...
4
votes
Is sequential consistency equivalent to performing memory accesses by a processes in program order and performing each memory access atomically?
No, your definition is not quite equivalent to the definition of sequential consistency but would be closer to strict consistency. There are two relevant aspects: (a) there are multiple processors/...
4
votes
Efficient static race detection
we want to understand how such a problem would be tackled in the industry
The typical approach is to either avoid shared memory in the first place, using things like immutable data structures. Or ...
4
votes
Determine when distributed and parallel process is completed
Do you want to poll (repeatedly ask "are you finished yet?") or wait on a blocking primitive?
The first is simple: Have a database table where each row represents a task. One column is the ...
3
votes
Accepted
Relation Between Flynn's Taxonomy and Concurrency
Flynn's Taxonomy generally deals with much smaller "units" than Computational Models for Parallelism. After all, the "I" stands for (single, atomic, simple) "instructions".
Also, Flynn's Taxonomy ...
3
votes
Accepted
How do I know if a set of code is a good candidate for parallelization?
I'd suggest that it's about whether large chunks of work can be executed independently, in mostly-any order, without yielding different results. (Unless variations are acceptable or good.)
Three ...
3
votes
Accepted
Cloud computing platforms often default to one CPU. Does this mean I shouldn't use Parallel Programming?
Cloud computing deals with ridiculously parallel problems by default, like serving up resources from a URL. There are several ways to achieve parallelism, regardless of the number of cores you have. ...
3
votes
Programming language where every function call/block is done in a separate thread?
It is possible but it would not be useful for 99+% of all thinkable applications. Logic is typicallry sequence-bound, it is a flow. Step by step you reach a solution to a problem and the order of the ...
3
votes
Accepted
Approaches of splitting the same type of work among multiple threads in C++
I was wondering if the constant re-starting of threads causes significant overheads and taken a look at thread pooling.
Constant re-starting of threads is indeed a bad idea, but std::async doesn't ...
2
votes
Programming language where every function call/block is done in a separate thread?
What you're looking for is called implicit parallellism, and there are languages which have explored this concept, such as Sun/Oracle's Fortress. Among other things, it (potentially) runs loops in ...
2
votes
Programming language where every function call/block is done in a separate thread?
Clojure may be worth a look for some ideas.
http://clojure-doc.org/articles/language/concurrency_and_parallelism.html
Here are some thoughts:
If we call a unit of computation that can be performed ...
2
votes
Programming language where every function call/block is done in a separate thread?
While not a programming language as such, you should take a look at VHDL. It is used to describe digital circuitry, which naturally does everything in parallel unless you specifically tell it to do it ...
2
votes
Is the logic behind `Asyncio.wait()` and async/await, the same, just the code is written differently (syntax)?
See this excellent blog post. In brief, asyncio is an event loop library (introduced in 3.4) that's focused on I/O, and largely on networking in particular. It introduced the asyncio.coroutine ...
2
votes
Get service data of future iterations
Not sure I understand your design. You seem to be Waiting for each and every task right after you start it. I would think you'd have two loops (one to create and start the tasks, another to go back ...
2
votes
How to design a good generic tiled image downloader?
Here is a sketch of an algorithm which should do the trick - functional tools to the rescue:
Implement your core downloader not in terms of a list of URLs, but in terms of a stream (or generator) of ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
parallel-programming × 73parallelism × 16
multithreading × 14
c# × 9
concurrency × 9
architecture × 5
c++ × 5
algorithms × 5
python × 5
asynchronous-programming × 4
java × 3
.net × 3
programming-languages × 3
c × 3
distributed-system × 3
async × 3
actor-model × 3
design × 2
design-patterns × 2
object-oriented × 2
performance × 2
functional-programming × 2
language-design × 2
ruby × 2
syntax × 2